From a0e5c49ac365955b2a10246bacab62bbb3bd1f19 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 27 Mar 2021 02:48:38 +0000 Subject: [PATCH] Clusterfuzz found another way (#15160) (#15168) 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 2ea0b56f7..bec9ba2fb 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -313,7 +313,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) {