diff options
author | zeripath <art27@cantab.net> | 2021-03-25 23:21:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-26 01:21:00 +0200 |
commit | b68eb54f95f894a71a1a91c22eff90e1d2f38a0e (patch) | |
tree | dee58db680d12b8815831f4cfe6f566a6fbfa6e0 /modules/markup/html.go | |
parent | 0048d7c7cf0d6482fe3d4ceec1b3cc93b4b560ed (diff) | |
download | gitea-b68eb54f95f894a71a1a91c22eff90e1d2f38a0e.tar.gz gitea-b68eb54f95f894a71a1a91c22eff90e1d2f38a0e.zip |
Clusterfuzz found another way (#15160)
Clusterfuzz found another way so I found another way to stop it
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/markup/html.go')
-rw-r--r-- | modules/markup/html.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/markup/html.go b/modules/markup/html.go index 2ea0b56f72..bec9ba2fb4 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) { |