Prevent markdown from adding rel=nofollow

This commit is contained in:
Daniele Tonon
2023-06-06 12:22:07 +02:00
parent 9a7c47a2aa
commit 45e6a20085

View File

@@ -282,6 +282,7 @@ func replaceURLsWithTags(line string) string {
func sanitizeXSS(html string) string {
p := bluemonday.UGCPolicy()
p.AllowStyling()
p.RequireNoFollowOnLinks(false)
p.AllowElements("video", "source", "iframe")
p.AllowAttrs("controls", "width").OnElements("video")
p.AllowAttrs("src", "width").OnElements("source")