mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-18 06:44:22 +01:00
Prevent markdown from adding rel=nofollow
This commit is contained in:
1
utils.go
1
utils.go
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user