Skip to content

Commit 6198403

Browse files
Fix another clusterfuzz identified issue (#15096) (#15114)
Backport #15096 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: techknowlogick <[email protected]>
1 parent a6290f6 commit 6198403

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/markup/html.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ func (ctx *postProcessCtx) postProcess(rawHTML []byte) ([]byte, error) {
312312
_, _ = res.WriteString("<html><body>")
313313

314314
// Strip out nuls - they're always invalid
315-
_, _ = nulCleaner.WriteString(res, string(tagCleaner.ReplaceAll(rawHTML, []byte("&lt;$1"))))
315+
_, _ = res.Write(tagCleaner.ReplaceAll([]byte(nulCleaner.Replace(string(rawHTML))), []byte("&lt;$1")))
316316

317317
// close the tags
318318
_, _ = res.WriteString("</body></html>")

0 commit comments

Comments
 (0)