From aa14069f8b2ddfd52a6baedb4ab443f9731ad55a Mon Sep 17 00:00:00 2001 From: Umputun Date: Fri, 26 Mar 2021 16:05:41 -0500 Subject: [PATCH] lint: fix func comment --- backend/app/store/comment.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/store/comment.go b/backend/app/store/comment.go index 0c0e0fc6..80de8bfe 100644 --- a/backend/app/store/comment.go +++ b/backend/app/store/comment.go @@ -153,8 +153,8 @@ func (c *Comment) Snippet(limit int) string { var reHref = regexp.MustCompile(`]*?\s+)?href="([^"]*)"`) -// wrap with href to trigger bluemonday sanitizer -// clean href after sanitizing done +// SanitizeAsURL drops dangerous code from a url. +// It wraps input with href to trigger bluemonday sanitizer and cleans href after sanitizing done func (c *Comment) SanitizeAsURL(inp string) string { h := fmt.Sprintf(``, inp) clean := bluemonday.UGCPolicy().Sanitize(h)