From 8d4f8ebf3105811f9d4fe6338f32ecc5c0b76452 Mon Sep 17 00:00:00 2001 From: zeripath Date: Fri, 26 Mar 2021 23:53:51 +0000 Subject: [PATCH] Clusterfuzz found another way (#15160) (#15169) Backport #15160 Clusterfuzz found another way so I found another way to stop it 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 b462b6b34..3d218c407 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -298,7 +298,7 @@ func RenderEmoji( return ctx.postProcess(rawHTML) } -var tagCleaner = regexp.MustCompile(`<((?:/?\w+/\w+)|(?:/[\w ]+/)|(/?[hH][tT][mM][lL][ />])|(/?[hH][eE][aA][dD][ />]))`) +var tagCleaner = regexp.MustCompile(`<((?:/?\w+/\w+)|(?:/[\w ]+/)|(/?[hH][tT][mM][lL]\b)|(/?[hH][eE][aA][dD]\b))`) var nulCleaner = strings.NewReplacer("\000", "") func (ctx *postProcessCtx) postProcess(rawHTML []byte) ([]byte, error) {