Skip to content

Commit

Permalink
Fix race condition in ReplaceSanitizer (go-gitea#9123)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeripath authored Nov 22, 2019
1 parent 30fde47 commit 675f275
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion modules/markup/sanitizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func NewSanitizer() {

// ReplaceSanitizer replaces the current sanitizer to account for changes in settings
func ReplaceSanitizer() {
sanitizer = &Sanitizer{}
sanitizer.policy = bluemonday.UGCPolicy()
// We only want to allow HighlightJS specific classes for code blocks
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`^language-\w+$`)).OnElements("code")
Expand Down

0 comments on commit 675f275

Please sign in to comment.