diff options
author | zeripath <art27@cantab.net> | 2021-03-22 01:45:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-22 02:45:01 +0100 |
commit | a587a284349e7c27d1bec39ef0dedb3972ef68c5 (patch) | |
tree | 550c9e53d9d857854116e364dba997ba2725fae6 /modules/markup | |
parent | e6377d5eb4fdff12f832c47147430b90fbd90c53 (diff) | |
download | gitea-a587a284349e7c27d1bec39ef0dedb3972ef68c5.tar.gz gitea-a587a284349e7c27d1bec39ef0dedb3972ef68c5.zip |
Fix another clusterfuzz identified issue (#15096)
* Fix another clusterfuzz identified issue
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/markup')
-rw-r--r-- | modules/markup/html.go | 2 |
1 files changed, 1 insertions, 1 deletions
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("<html><body>") // 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("</body></html>") |