From a6c1f4ae410fd525cbca6944269e8e57c06d2e9b Mon Sep 17 00:00:00 2001 From: Rob Loranger Date: Wed, 18 Sep 2019 08:21:33 -0700 Subject: [PATCH] allow titles for abbreviation elements this allows abbreviation elements to keep their title attributes when containing special characters. --- postrender.go | 1 + 1 file changed, 1 insertion(+) diff --git a/postrender.go b/postrender.go index 9ea6a7e..83fb5ad 100644 --- a/postrender.go +++ b/postrender.go @@ -170,6 +170,7 @@ func getSanitizationPolicy() *bluemonday.Policy { policy.AllowAttrs("controls", "loop", "muted", "autoplay").OnElements("video") policy.AllowAttrs("controls", "loop", "muted", "autoplay", "preload").OnElements("audio") policy.AllowAttrs("target").OnElements("a") + policy.AllowAttrs("title").OnElements("abbr") policy.AllowAttrs("style", "class", "id").Globally() policy.AllowURLSchemes("http", "https", "mailto", "xmpp") return policy