diff options
author | 2023-08-11 14:40:11 +0200 | |
---|---|---|
committer | 2023-08-11 14:40:11 +0200 | |
commit | dc96562b4084e058846aea9102ef0257461717d6 (patch) | |
tree | a0b4bdbaa266386c7fdbbc02ca3e62bae559bf17 /internal/text/plain.go | |
parent | [feature] Set Content-Security-Policy header (#2095) (diff) | |
download | gotosocial-dc96562b4084e058846aea9102ef0257461717d6.tar.xz |
[bugfix] Use custom bluemonday policy to disallow inline img tags (#2100)
Diffstat (limited to 'internal/text/plain.go')
-rw-r--r-- | internal/text/plain.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/internal/text/plain.go b/internal/text/plain.go index b1c2a2c33..330ebfb15 100644 --- a/internal/text/plain.go +++ b/internal/text/plain.go @@ -65,13 +65,10 @@ func (f *formatter) fromPlain( result.HTML = htmlContentBytes.String() // Clean anything dangerous out of resulting HTML. - result.HTML = SanitizeHTML(result.HTML) + result.HTML = SanitizeToHTML(result.HTML) // Shrink ray! - var err error - if result.HTML, err = m.String("text/html", result.HTML); err != nil { - log.Errorf(ctx, "error minifying HTML: %s", err) - } + result.HTML = MinifyHTML(result.HTML) return result } |