Fix usage of strings.ReplaceAll

This commit is contained in:
Manuel Rüger 2023-05-05 14:43:36 +02:00
parent eba2396010
commit 2aa1606d11

View File

@ -282,7 +282,7 @@ func GetChecksum(reader io.Reader) (string, error) {
func parseAttachmentLink(attachLink string) string {
uri, err := url.ParseRequestURI(attachLink)
if err != nil {
return strings.ReplaceAll("&", "&", attachLink)
return strings.ReplaceAll(attachLink, "&", "&")
} else {
return uri.Path +
"?" + url.QueryEscape(uri.Query().Encode())