]> source.dussan.org Git - gitea.git/commitdiff
another clusterfuzz spotted issue (#15032)
authorzeripath <art27@cantab.net>
Thu, 18 Mar 2021 21:37:11 +0000 (21:37 +0000)
committerGitHub <noreply@github.com>
Thu, 18 Mar 2021 21:37:11 +0000 (22:37 +0100)
Signed-off-by: Andrew Thornton <art27@cantab.net>
modules/markup/html.go

index 96692752a137e4646002ab9ddc64ca00b8f95211..a7d66cc2490a7c836e1cb85e0e69cd0af0228a2b 100644 (file)
@@ -313,7 +313,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) {