Browse Source

Fix another clusterfuzz identified issue (#15096) (#15113)

Backport #15096

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
mj-v1.14.3
zeripath 1 year ago
committed by GitHub
parent
commit
23db3375df
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/markup/html.go

2
modules/markup/html.go

@ -327,7 +327,7 @@ func (ctx *postProcessCtx) postProcess(rawHTML []byte) ([]byte, error) {
_, _ = res.WriteString("<html><body>")
// Strip out nuls - they're always invalid
_, _ = nulCleaner.WriteString(res, string(tagCleaner.ReplaceAll(rawHTML, []byte("&lt;$1"))))
_, _ = res.Write(tagCleaner.ReplaceAll([]byte(nulCleaner.Replace(string(rawHTML))), []byte("&lt;$1")))
// close the tags
_, _ = res.WriteString("</body></html>")

Loading…
Cancel
Save