dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit d374182a4f0506a35275ff0aa577482222badee2
parent e2559bdb3f5d6143338cd7573f85375090f8c0c1
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu,  6 Apr 2023 17:13:41 -0700

replace @ in url to prevent tag colorification from producing invalid html

Diffstat:
Mpkg/web/handlers/api/v1/topBarHandler.go | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/pkg/web/handlers/api/v1/topBarHandler.go b/pkg/web/handlers/api/v1/topBarHandler.go @@ -796,6 +796,9 @@ var yewtubeBeIDRgx = youtubeComIDRgx var invidiousIDRgx = youtubeComIDRgx func makeHtmlLink(label, link string) string { + r := strings.NewReplacer("@", "&#64;") + label = r.Replace(label) + link = r.Replace(link) return fmt.Sprintf(`<a href="%s" rel="noopener noreferrer" target="_blank">%s</a>`, link, label) }