]> source.dussan.org Git - gitea.git/commitdiff
another clusterfuzz spotted issue (#15032) (#15034)
author6543 <6543@obermui.de>
Thu, 18 Mar 2021 22:21:33 +0000 (23:21 +0100)
committerGitHub <noreply@github.com>
Thu, 18 Mar 2021 22:21:33 +0000 (00:21 +0200)
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
modules/markup/html.go

index a81b03f071112b0bba205198af3d19ad01909256..c2e574e3b29f56407d330dff574d1e8730d61d9a 100644 (file)
@@ -298,7 +298,7 @@ func RenderEmoji(
        return ctx.postProcess(rawHTML)
 }
 
-var tagCleaner = regexp.MustCompile(`<((?:/?\w+/\w+)|(?:/[\w ]+/)|(/?[hH][tT][mM][lL][ />]))`)
+var tagCleaner = regexp.MustCompile(`<((?:/?\w+/\w+)|(?:/[\w ]+/)|(/?[hH][tT][mM][lL][ />])|(/?[hH][eE][aA][dD][ />]))`)
 var nulCleaner = strings.NewReplacer("\000", "")
 
 func (ctx *postProcessCtx) postProcess(rawHTML []byte) ([]byte, error) {