diff --git a/internal/route/email.go b/internal/route/email.go index 24c8470..85419f7 100644 --- a/internal/route/email.go +++ b/internal/route/email.go @@ -81,6 +81,8 @@ func serveEmailHTMLContent(w http.ResponseWriter, r *http.Request) { } policy := bluemonday.UGCPolicy() + policy.AllowAttrs("style", "color", "bgcolor").OnElements("h1", "h2", "h3", "h4", "h5", "h6", "p", "ul", "ol", "li", "a", "br", "strong", "em", "i", "b", "u", "span", "div", "table", "thead", "tbody", "tr", "th", "td", "img") + sanitizedHTML := policy.Sanitize(email.HTML) w.Header().Set("Content-Type", "text/html")