Skip to content

Commit

Permalink
Fix another clusterfuzz identified issue (#15096) (#15114)
Browse files Browse the repository at this point in the history
Backport #15096

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
  • Loading branch information
zeripath and techknowlogick authored Mar 22, 2021
1 parent a6290f6 commit 6198403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/markup/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,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>")
Expand Down

0 comments on commit 6198403

Please sign in to comment.