File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ func ReplaceSanitizer() {
66
66
sanitizer .policy .AllowAttrs ("class" ).Matching (regexp .MustCompile (`emoji` )).OnElements ("img" )
67
67
68
68
// Allow icons, checkboxes, emojis, and chroma syntax on span
69
- sanitizer .policy .AllowAttrs ("class" ).Matching (regexp .MustCompile (`^((icon(\s+[\p{L}\p{N}_-]+)+)|(ui checkbox)|(ui checked checkbox)|(emoji))$|^((c|g|i|k|m|n|o|s|u|v|w) [a-z0-9]{0,2})$` )).OnElements ("span" )
69
+ sanitizer .policy .AllowAttrs ("class" ).Matching (regexp .MustCompile (`^((icon(\s+[\p{L}\p{N}_-]+)+)|(ui checkbox)|(ui checked checkbox)|(emoji))$|^([a-z] [a-z0-9]{0,2})$` )).OnElements ("span" )
70
70
71
71
// Allow generally safe attributes
72
72
generalSafeAttrs := []string {"abbr" , "accept" , "accept-charset" ,
You can’t perform that action at this time.
0 commit comments