mirror of
https://github.com/go-shiori/shiori.git
synced 2024-11-16 06:06:31 +08:00
Clear fragment from URL
This commit is contained in:
parent
1baf921b49
commit
7532d36e7e
2 changed files with 8 additions and 4 deletions
|
@ -43,7 +43,8 @@ func (h *cmdHandler) addBookmark(cmd *cobra.Command, args []string) {
|
|||
return
|
||||
}
|
||||
|
||||
// Clear UTM parameters from URL
|
||||
// Clear fragment and UTM parameters from URL
|
||||
parsedURL.Fragment = ""
|
||||
clearUTMParams(parsedURL)
|
||||
|
||||
// Create bookmark item
|
||||
|
@ -238,7 +239,8 @@ func (h *cmdHandler) updateBookmarks(cmd *cobra.Command, args []string) {
|
|||
return
|
||||
}
|
||||
|
||||
// Clear UTM parameters from URL
|
||||
// Clear fragment and UTM parameters from URL
|
||||
parsedURL.Fragment = ""
|
||||
clearUTMParams(parsedURL)
|
||||
url = parsedURL.String()
|
||||
|
||||
|
@ -623,7 +625,8 @@ func (h *cmdHandler) importBookmarks(cmd *cobra.Command, args []string) {
|
|||
continue
|
||||
}
|
||||
|
||||
// Clear UTM parameters from URL
|
||||
// Clear fragment and UTM parameters from URL
|
||||
parsedURL.Fragment = ""
|
||||
clearUTMParams(parsedURL)
|
||||
book.URL = parsedURL.String()
|
||||
|
||||
|
|
|
@ -111,7 +111,8 @@ func (h *webHandler) apiInsertBookmark(w http.ResponseWriter, r *http.Request, p
|
|||
panic(fmt.Errorf("URL is not valid"))
|
||||
}
|
||||
|
||||
// Clear UTM parameter from URL
|
||||
// Clear fragment and UTM parameters from URL
|
||||
parsedURL.Fragment = ""
|
||||
clearUTMParams(parsedURL)
|
||||
book.URL = parsedURL.String()
|
||||
|
||||
|
|
Loading…
Reference in a new issue