lint: fix func comment

This commit is contained in:
Umputun
2021-03-26 16:05:41 -05:00
parent ddbceb5375
commit aa14069f8b
+2 -2
View File
@@ -153,8 +153,8 @@ func (c *Comment) Snippet(limit int) string {
var reHref = regexp.MustCompile(`<a\s+(?:[^>]*?\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(`<a href="%s">`, inp)
clean := bluemonday.UGCPolicy().Sanitize(h)