1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 01:57:02 +00:00

chore: more small lint/perf fixes (#493)

Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
James Hillyerd
2024-02-16 16:53:50 -08:00
committed by GitHub
parent f76b93a8f2
commit 33784cbb94
11 changed files with 40 additions and 38 deletions

View File

@@ -21,6 +21,6 @@ func TextToHTML(text string) string {
// WrapURL wraps a <a href> tag around the provided URL
func WrapURL(url string) string {
unescaped := strings.Replace(url, "&amp;", "&", -1)
unescaped := strings.ReplaceAll(url, "&amp;", "&")
return fmt.Sprintf("<a href=\"%s\" target=\"_blank\">%s</a>", unescaped, url)
}