Prevent 500 with badly formed task list (#11328)
Fix #11317 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
c9187b8116
commit
742e26f5a5
4 changed files with 29 additions and 23 deletions
|
@ -54,7 +54,7 @@ func ReplaceSanitizer() {
|
|||
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`ref-issue`)).OnElements("a")
|
||||
|
||||
// Allow classes for task lists
|
||||
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`task-list`)).OnElements("ul")
|
||||
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`task-list-item`)).OnElements("li")
|
||||
|
||||
// Allow icons
|
||||
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`^icon(\s+[\p{L}\p{N}_-]+)+$`)).OnElements("i")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue