From a587a284349e7c27d1bec39ef0dedb3972ef68c5 Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 22 Mar 2021 01:45:01 +0000 Subject: [PATCH] Fix another clusterfuzz identified issue (#15096) * Fix another clusterfuzz identified issue Signed-off-by: Andrew Thornton --- modules/markup/html.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/markup/html.go b/modules/markup/html.go index a7d66cc249..2ea0b56f72 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -327,7 +327,7 @@ func (ctx *postProcessCtx) postProcess(rawHTML []byte) ([]byte, error) { _, _ = res.WriteString("") // Strip out nuls - they're always invalid - _, _ = nulCleaner.WriteString(res, string(tagCleaner.ReplaceAll(rawHTML, []byte("<$1")))) + _, _ = res.Write(tagCleaner.ReplaceAll([]byte(nulCleaner.Replace(string(rawHTML))), []byte("<$1"))) // close the tags _, _ = res.WriteString("")