Skip to content

Commit

Permalink
Clusterfuzz found another way (go-gitea#15160)
Browse files Browse the repository at this point in the history
Backport go-gitea#15160

Clusterfuzz found another way so I found another way to stop it

Signed-off-by: Andrew Thornton <[email protected]>
  • Loading branch information
zeripath committed Mar 26, 2021
1 parent 3558310 commit 1addfc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/markup/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1addfc7

Please sign in to comment.