Browse Source

Fix race condition in ReplaceSanitizer (#9123)

tags/v1.11.0-rc1
zeripath 4 years ago
parent
commit
675f275237
No account linked to committer's email address
1 changed files with 0 additions and 1 deletions
  1. 0
    1
      modules/markup/sanitizer.go

+ 0
- 1
modules/markup/sanitizer.go View File

@@ -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")

Loading…
Cancel
Save