From dc96562b4084e058846aea9102ef0257461717d6 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 11 Aug 2023 14:40:11 +0200 Subject: [bugfix] Use custom bluemonday policy to disallow inline img tags (#2100) --- internal/text/markdown.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'internal/text/markdown.go') diff --git a/internal/text/markdown.go b/internal/text/markdown.go index c7d4958f4..ecc49673b 100644 --- a/internal/text/markdown.go +++ b/internal/text/markdown.go @@ -57,13 +57,10 @@ func (f *formatter) FromMarkdown(ctx context.Context, pmf gtsmodel.ParseMentionF result.HTML = htmlContentBytes.String() // clean anything dangerous out of the HTML - result.HTML = SanitizeHTML(result.HTML) + result.HTML = SanitizeToHTML(result.HTML) // shrink ray - result.HTML, err = m.String("text/html", result.HTML) - if err != nil { - log.Errorf(ctx, "error minifying HTML: %s", err) - } + result.HTML = MinifyHTML(result.HTML) return result } -- cgit v1.2.3