aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeripath2021-03-26 23:53:51 +0000
committerGitHub2021-03-27 01:53:51 +0200
commit8d4f8ebf3105811f9d4fe6338f32ecc5c0b76452 (patch)
tree40827d178efd4fec2d154548f108226e871a407d
parent4f47bf5346db1d2b3155b6136309b0fa80a3a517 (diff)
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 <art27@cantab.net>
-rw-r--r--modules/markup/html.go2
1 files changed, 1 insertions, 1 deletions
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) {