From 3bf17752ab5b810eaa01f48c316ba9333055b20b Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 20 Jan 2020 18:28:49 +0100 Subject: plugins/base: remove external resources URLs, sanitize CSS --- plugins/base/routes.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins/base/routes.go') 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 } -- cgit v1.2.3-59-g8ed1b