Skip to content

Commit acf7dc5

Browse files
author
Raniere Silva
committed
Update MathML lists
- MathML elements update based on https://developer.mozilla.org/en-US/docs/Web/MathML/Element - MathML attributes update based on https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute
1 parent 068bebc commit acf7dc5

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

Text/HTML/SanitizeXSS.hs

+27-14
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,13 @@ acceptable_elements = ["a", "abbr", "acronym", "address", "area",
148148
"u", "ul", "var", "video"]
149149

150150
mathml_elements :: [Text]
151-
mathml_elements = ["maction", "math", "merror", "mfrac", "mi",
152-
"mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom",
153-
"mprescripts", "mroot", "mrow", "mspace", "msqrt", "mstyle", "msub",
154-
"msubsup", "msup", "mtable", "mtd", "mtext", "mtr", "munder",
155-
"munderover", "none"]
151+
mathml_elements = ["math", "maction", "maligngroup", "malignmark", "menclose",
152+
"merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mlongdiv",
153+
"mmultiscripts", "mn", "mo", "mover", "mpadded", "mphanthom", "mroot",
154+
"mrow", "ms", "mscarries", "mscarry", "msgroup", "msline", "mspace",
155+
"msqrt", "msrow", "mstack", "mstyle", "msub", "msup", "msubsup",
156+
"mtable", "mtd", "mtext", "mtr", "munder", "munderover", "semantics",
157+
"annotation", "annotation-xml"]
156158

157159
-- this should include altGlyph I think
158160
svg_elements :: [Text]
@@ -198,15 +200,26 @@ acceptable_protocols = [ "ed2k", "ftp", "http", "https", "irc",
198200
"ssh", "sftp", "rtsp", "afs" ]
199201

200202
mathml_attributes :: [Text]
201-
mathml_attributes = ["actiontype", "align", "columnalign", "columnalign",
202-
"columnalign", "columnlines", "columnspacing", "columnspan", "depth",
203-
"display", "displaystyle", "equalcolumns", "equalrows", "fence",
204-
"fontstyle", "fontweight", "frame", "height", "linethickness", "lspace",
205-
"mathbackground", "mathcolor", "mathvariant", "mathvariant", "maxsize",
206-
"minsize", "other", "rowalign", "rowalign", "rowalign", "rowlines",
207-
"rowspacing", "rowspan", "rspace", "scriptlevel", "selection",
208-
"separator", "stretchy", "width", "width", "xlink:href", "xlink:show",
209-
"xlink:type", "xmlns", "xmlns:xlink"]
203+
mathml_attributes = ["accent", "accentunder", "actiontype", "align",
204+
"alignmentscope", "altimg", "altimg-width", "altimg-height",
205+
"altimg-valign", "alttext", "bevelled", "charalign", "close",
206+
"columnalign", "columnlines", "columnspacing", "columnspan",
207+
"columnwidth", "crossout", "decimalpoint", "denomalign", "depth", "dir",
208+
"display", "displaystyle", "edge", "encoding", "equalcolumns", "equalrows",
209+
"fence", "form", "frame", "framespacing", "groupalign", "height",
210+
"href", "id", "indentalign", "indentalignfirst", "indentaignlast",
211+
"identshift", "indentshiftfirst", "indentshiftlast", "indenttarget",
212+
"infixlinebreakstyle", "largeop", "lenght", "linebreak",
213+
"linebreakmultchar", "linebreakstyle", "lineleading", "linethickness",
214+
"location", "longdivstyle", "lspace", "lquote", "mathbackground",
215+
"mathcolor", "mathsize", "mathvariant", "maxsize", "minlabelspacing",
216+
"minsize", "movablelimits", "notation", "numalign", "open",
217+
"overflow", "position", "rowalign", "rowlines", "rowspacing",
218+
"rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize",
219+
"scriptsizemultiplier", "selection", "separator", "separators",
220+
"shift", "side", "src", "stackalign", "stretchy", "subscriptshift",
221+
"supscriptshift", "symmetric", "voffset", "width",
222+
"xlink:href", "xmlns"]
210223

211224
svg_attributes :: [Text]
212225
svg_attributes = ["accent-height", "accumulate", "additive", "alphabetic",

0 commit comments

Comments
 (0)