We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1ff830 commit 58da585Copy full SHA for 58da585
modules/markup/sanitizer_default.go
@@ -30,6 +30,9 @@ func (st *Sanitizer) createDefaultPolicy() *bluemonday.Policy {
30
// Chroma always uses 1-2 letters for style names, we could tolerate it at the moment
31
policy.AllowAttrs("class").Matching(regexp.MustCompile(`^\w{0,2}$`)).OnElements("span")
32
33
+ // Line numbers on codepreview
34
+ policy.AllowAttrs("data-line-number").OnElements("span")
35
+
36
// Custom URL-Schemes
37
if len(setting.Markdown.CustomURLSchemes) > 0 {
38
policy.AllowURLSchemes(setting.Markdown.CustomURLSchemes...)
0 commit comments