Skip to content

Commit 1d2174c

Browse files
committed
Add MathML sanitizer
More elements can be found at: https://developer.mozilla.org/en-US/docs/Web/MathML/Reference/Element All seem to be reasonable safe, e.q. no XSS unless we allow for onload,href etc. For now we only allow for the tags and most of the time no attributes as those are probably too advanced for a contest setting.
1 parent af92629 commit 1d2174c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

webapp/config/packages/html_sanitizer.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,43 @@ framework:
44
app.clarification_sanitizer:
55
allow_safe_elements: true
66
allow_relative_medias: true
7+
allow_elements:
8+
msup: []
9+
mrow: []
10+
mfrac: []
11+
msqrt: []
12+
mfenced:
13+
- open
14+
- close
15+
mtable: []
16+
mtd: []
17+
mtr: []
18+
msubsup: []
19+
semantics: []
20+
mroot: []
21+
menclose:
22+
- notation
23+
mlabeledtr: []
24+
mstyle:
25+
- mathcolor
26+
- fontfamily
27+
- displaystyle
28+
math:
29+
- display
30+
- class
31+
mi:
32+
- class
33+
mn:
34+
- class
35+
mo:
36+
- class
37+
annotation-xml:
38+
- encoding
39+
apply: []
40+
bvar: []
41+
int: []
42+
ci: []
43+
cn: []
44+
lowlimit: []
45+
uplimit: []
46+
divide: []

0 commit comments

Comments
 (0)