aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/base/routes.go
diff options
context:
space:
mode:
authorLibravatarLibravatar Simon Ser <[email protected]> 2019-12-18 16:11:45 +0100
committerLibravatarLibravatar Simon Ser <[email protected]> 2020-01-20 16:20:15 +0100
commit721c3ce3eb41e76b0fddd2f5d42b0bfd99439bdd (patch)
tree23ba9ddff559ef1172b8169af317ee8da1ff6930 /plugins/base/routes.go
parentaf5ffd12f9c23ecf34e1f24b36804623479d44e9 (diff)
downloadalps-721c3ce3eb41e76b0fddd2f5d42b0bfd99439bdd.tar.gz
alps-721c3ce3eb41e76b0fddd2f5d42b0bfd99439bdd.tar.bz2
alps-721c3ce3eb41e76b0fddd2f5d42b0bfd99439bdd.zip
Resize e-mail iframe with content
Diffstat (limited to 'plugins/base/routes.go')
-rw-r--r--plugins/base/routes.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/base/routes.go b/plugins/base/routes.go
index 02518cc..7b02f11 100644
--- a/plugins/base/routes.go
+++ b/plugins/base/routes.go
@@ -247,6 +247,9 @@ func handleGetPart(ctx *koushin.Context, raw bool) error {
isHTML := false
if strings.EqualFold(mimeType, "text/html") {
p := bluemonday.UGCPolicy()
+ // TODO: be more strict
+ p.AllowElements("style")
+ p.AllowAttrs("style")
body = p.Sanitize(body)
isHTML = true
}