File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -126,9 +126,9 @@ func createDefaultPolicy() *bluemonday.Policy {
126
126
policy .AllowAttrs ("class" ).Matching (regexp .MustCompile ("^file-preview-box$" )).OnElements ("div" )
127
127
policy .AllowAttrs ("class" ).Matching (regexp .MustCompile ("^ui table$" )).OnElements ("div" )
128
128
policy .AllowAttrs ("class" ).Matching (regexp .MustCompile ("^header$" )).OnElements ("div" )
129
- policy .AllowAttrs ("data-line-number" ).OnElements ("span" )
129
+ policy .AllowAttrs ("data-line-number" ).Matching ( regexp . MustCompile ( "^[0-9]+$" )). OnElements ("span" )
130
130
policy .AllowAttrs ("class" ).Matching (regexp .MustCompile ("^text small grey$" )).OnElements ("span" )
131
- policy .AllowAttrs ("rel" ).OnElements ("td" )
131
+ policy .AllowAttrs ("rel" ).Matching ( regexp . MustCompile ( "^L[0-9]+$" )). OnElements ("td" )
132
132
policy .AllowAttrs ("class" ).Matching (regexp .MustCompile ("^file-preview*" )).OnElements ("table" )
133
133
policy .AllowAttrs ("class" ).Matching (regexp .MustCompile ("^lines-escape$" )).OnElements ("td" )
134
134
policy .AllowAttrs ("class" ).Matching (regexp .MustCompile ("^toggle-escape-button btn interact-bg$" )).OnElements ("a" )
You can’t perform that action at this time.
0 commit comments