Skip to content

Commit 675f275

Browse files
authored
Fix race condition in ReplaceSanitizer (#9123)
1 parent 30fde47 commit 675f275

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

modules/markup/sanitizer.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ func NewSanitizer() {
3434

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

0 commit comments

Comments
 (0)