Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add some missing MathML elements and attributes.#181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
fred-wang wants to merge2 commits intohtml5lib:masterfromfred-wang:master
Closed
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletionshtml5lib/sanitizer.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,11 +24,15 @@ class HTMLSanitizerMixin(object):
'sub', 'sup', 'table', 'tbody', 'td', 'textarea', 'time', 'tfoot',
'th', 'thead', 'tr', 'tt', 'u', 'ul', 'var', 'video']

mathml_elements = ['maction', 'math', 'merror', 'mfrac', 'mi',
'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom',
'mprescripts', 'mroot', 'mrow', 'mspace', 'msqrt', 'mstyle', 'msub',
'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder',
'munderover', 'none']
mathml_elements = ['annotation', 'annotation-xml', 'maction', 'maligngroup',
'malignmark', 'math', 'menclose', 'merror', 'mfenced',
'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mlongdiv',
'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded',
'mphantom', 'mprescripts', 'mroot', 'mrow', 'ms',
'mscarries', 'mscarry', 'msgroup', 'msline', 'mstack',
'mspace', 'msqrt', 'msrow', 'mstack' 'mstyle', 'msub',
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

mstack is added twice here :-(

'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr',
'munder', 'munderover', 'none', 'semantics']

svg_elements = ['a', 'animate', 'animateColor', 'animateMotion',
'animateTransform', 'clipPath', 'circle', 'defs', 'desc', 'ellipse',
Expand DownExpand Up@@ -61,15 +65,33 @@ class HTMLSanitizerMixin(object):
'urn', 'valign', 'value', 'variable', 'volume', 'vspace', 'vrml',
'width', 'wrap', 'xml:lang']

mathml_attributes = ['actiontype', 'align', 'columnalign', 'columnalign',
'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'depth',
'display', 'displaystyle', 'equalcolumns', 'equalrows', 'fence',
'fontstyle', 'fontweight', 'frame', 'height', 'linethickness', 'lspace',
'mathbackground', 'mathcolor', 'mathvariant', 'mathvariant', 'maxsize',
'minsize', 'other', 'rowalign', 'rowalign', 'rowalign', 'rowlines',
'rowspacing', 'rowspan', 'rspace', 'scriptlevel', 'selection',
'separator', 'stretchy', 'width', 'width', 'xlink:href', 'xlink:show',
'xlink:type', 'xmlns', 'xmlns:xlink']
mathml_attributes = ['accent', 'accentunder', 'actiontype', 'align',
'alignmentscope', 'altimg', 'altimg-height',
'altimg-valign', 'altimg-width', 'alttext', 'bevelled',
'charalign', 'close', 'columnalign', 'columnlines',
'columnspacing', 'columnspan', 'columnwidth',
'crossout', 'decimalpoint', 'denomalign', 'depth',
'dir', 'display', 'displaystyle', 'edge', 'encoding',
'equalcolumns', 'equalrows', 'fence', 'fontstyle',
'fontweight', 'form', 'frame', 'framespacing',
'groupalign', 'height', 'href', 'id', 'indentalign',
'indentalignfirst', 'indentalignlast', 'indentshift',
'indentshiftfirst', 'indentshiftlast', 'indenttarget',
'infixlinebreakstyle', 'largeop', 'length',
'linebreak', 'linebreakmultchar', 'linebreakstyle',
'lineleading', 'linethickness', 'location',
'longdivstyle', 'lquote', 'lspace', 'mathbackground',
'mathcolor', 'mathsize', 'mathvariant', 'maxsize',
'minlabelspacing', 'minsize', 'movablelimits',
'notation', 'numalign', 'open', 'other', 'overflow',
'position', 'rowalign', 'rowlines', 'rowspacing',
'rowspan', 'rquote', 'rspace', 'scriptlevel',
'scriptminsize', 'scriptsizemultiplier', 'selection',
'separator', 'separators', 'shift', 'side', 'src',
'stackalign', 'stretchy', 'subscriptshift',
'superscriptshift', 'symmetric', 'voffset', 'width',
'xlink:href', 'xlink:show', 'xlink:type', 'xmlns',
'xmlns:xlink']

svg_attributes = ['accent-height', 'accumulate', 'additive', 'alphabetic',
'arabic-form', 'ascent', 'attributeName', 'attributeType',
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp