Browse Source

[GinR] Markdown sanitisation allows class on div

cgars 7 năm trước cách đây
mục cha
commit
b2f91b4326
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      pkg/markup/sanitizer.go

+ 2 - 0
pkg/markup/sanitizer.go

@@ -41,6 +41,8 @@ func NewSanitizer() {
 
 		// Custom URL-Schemes
 		sanitizer.policy.AllowURLSchemes(setting.Markdown.CustomURLSchemes...)
+
+		sanitizer.policy.AllowAttrs("class").OnElements("div")
 	})
 }