summaryrefslogtreecommitdiffstats
path: root/modules/markup
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-11-22 14:46:39 +0000
committerGitHub <noreply@github.com>2019-11-22 14:46:39 +0000
commit675f275237e4cdb79d1245c18041c1cd103228eb (patch)
tree7a4d9926388290a96b5f37f6bc5ad2f5b39538a2 /modules/markup
parent30fde478db9530e27018d997bd7591220bb3d85e (diff)
downloadgitea-675f275237e4cdb79d1245c18041c1cd103228eb.tar.gz
gitea-675f275237e4cdb79d1245c18041c1cd103228eb.zip
Fix race condition in ReplaceSanitizer (#9123)
Diffstat (limited to 'modules/markup')
-rw-r--r--modules/markup/sanitizer.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/modules/markup/sanitizer.go b/modules/markup/sanitizer.go
index f873e8105e..45d363b37e 100644
--- a/modules/markup/sanitizer.go
+++ b/modules/markup/sanitizer.go
@@ -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")