diff options
author | Simon Ser <contact@emersion.fr> | 2020-01-20 18:28:49 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-01-20 18:28:49 +0100 |
commit | 3bf17752ab5b810eaa01f48c316ba9333055b20b (patch) | |
tree | e77da7177474432718443c64a10a44e66c795f94 /plugins/base/routes.go | |
parent | b9a180b154fe3ba6e02fc3d7ac313d91d441014b (diff) | |
download | alps-3bf17752ab5b810eaa01f48c316ba9333055b20b.tar.gz alps-3bf17752ab5b810eaa01f48c316ba9333055b20b.zip |
plugins/base: remove external resources URLs, sanitize CSS
Diffstat (limited to 'plugins/base/routes.go')
-rw-r--r-- | plugins/base/routes.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/base/routes.go b/plugins/base/routes.go index 9232097..ad93c6f 100644 --- a/plugins/base/routes.go +++ b/plugins/base/routes.go @@ -244,7 +244,10 @@ func handleGetPart(ctx *koushin.Context, raw bool) error { isHTML := false if strings.EqualFold(mimeType, "text/html") { - body = sanitizeHTML(body) + body, err = sanitizeHTML(body) + if err != nil { + return fmt.Errorf("failed to sanitize HTML part: %v", err) + } isHTML = true } |