- From: <bugzilla@jessica.w3.org>
- Date: Tue, 29 Jun 2010 14:42:53 +0000
- To: public-html-bugzilla@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10047
Summary: HTML5 parser possible compat problem with pages that
use MathML elements in <mi>, <mo>, etc
Product: HTML WG
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: HTML5 spec (editor: Ian Hickson)
AssignedTo: ian@hixie.ch
ReportedBy: simonp@opera.com
QAContact: public-html-bugzilla@w3.org
CC: mike@w3.org, public-html@w3.org
The HTML5 parser "in foreign content" has:
↪A start tag whose tag name is neither "mglyph" nor "malignmark", if the
current node is an mi
element in the MathML namespace.
↪A start tag whose tag name is neither "mglyph" nor "malignmark", if the
current node is an mo
element in the MathML namespace.
↪A start tag whose tag name is neither "mglyph" nor "malignmark", if the
current node is an mn
element in the MathML namespace.
↪A start tag whose tag name is neither "mglyph" nor "malignmark", if the
current node is an ms
element in the MathML namespace.
↪A start tag whose tag name is neither "mglyph" nor "malignmark", if the
current node is an mtext
element in the MathML namespace.
...
Process the token using the rules for the secondary insertion mode.
This means that for <mi><mglyph> and <mi><malignmark>, the mglyph and
malignmark elements are in the MathML namespace, while for <mi><b> and
<mi><foobar> the b and foobar elements are in the HTML namespace.
The following page:
http://www.google.com/codesearch/p?hl=en#KGV8vs9gsGI/content/abacus/content/XNS/docs/BigDecimal.html&q=%3C(%5B%5E%5Cs/%5D%2B:)%3Fmath%20%3C(%5B%5E%5Cs/%5D%2B:)%3Fmo%3E%5B%5E%3C%5D*%3C%5B%5E/%5D&sa=N&cd=25&ct=rc
...has <mi><msub> and <mo><mrow>. msub and mrow and their children end up in
the HTML namespace which breaks the rendering of the formula. Compare:
http://canvex.lazyilluminati.com/misc/dom-viewer/x.html?%3Chtml%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%0A%3Cbody%3E%0A%3Cmath%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1998%2FMath%2FMathML%22%3E%0A%20%20%3Cmi%3EA%3C%2Fmi%3E%0A%20%20%3Cmo%3E%3D%3C%2Fmo%3E%0A%20%20%3Cmrow%3E%0A%20%20%20%20%3Cmo%3E%28%3C%2Fmo%3E%0A%20%20%20%20%3Cmunderover%3E%0A%20%20%20%20%20%20%3Cmo%3E%E2%88%91%3C%2Fmo%3E%0A%20%20%20%20%20%20%3Cmrow%3E%0A%20%20%20%20%20%20%20%20%3Cmi%3Ek%3C%2Fmi%3E%0A%20%20%20%20%20%20%20%20%3Cmo%3E%3D%3C%2Fmo%3E%0A%20%20%20%20%20%20%20%20%3Cmn%3E0%3C%2Fmn%3E%0A%20%20%20%20%20%20%3C%2Fmrow%3E%0A%20%20%20%20%20%20%3Cmo%3E%E2%88%9E%3C%2Fmo%3E%0A%20%20%20%20%3C%2Fmunderover%3E%0A%20%20%20%20%3Cmi%3E%3Cmsub%3E%0A%20%20%20%20%20%20%3Cmi%3Ea%3C%2Fmi%3E%0A%20%20%20%20%20%20%3Cmi%3Ek%3C%2Fmi%3E%0A%20%20%20%20%3C%2Fmsub%3E%0A%20%20%20%20%3C%2Fmi%3E%0A%20%20%20%20%3Cmo%3E%3Cmrow%3E%0A%20%20%20%20%20%20%3Cmrow%3E%0A%20%20%20%20%20%20%20%20*%3C%2Fmrow%3E%0A%20%20%20%20%20%20%3Cmsup%3E%0A%20%20%20%20%20%20%20%20%3Cmn%3E10%3C%2Fmn%3E%0A%20%20%20%20%20%20%20%20%3Cmrow%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cmo%3E-%3C%2Fmo%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cmi%3Ek%3C%2Fmi%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cmo%3E*%3C%2Fmo%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cmi%3Ej%3C%2Fmi%3E%0A%20%20%20%20%20%20%20%20%3C%2Fmrow%3E%0A%20%20%20%20%20%20%3C%2Fmsup%3E%0A%20%20%20%20%3C%2Fmrow%3E%0A%20%20%20%20%3C%2Fmo%3E%0A%20%20%20%20%3Cmo%3E%29%3C%2Fmo%3E%0A%20%20%3C%2Fmrow%3E%0A%3C%2Fmath%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E
...with:
http://livedom.validator.nu/?%3Chtml%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%0A%3Cbody%3E%0A%3Cmath%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1998%2FMath%2FMathML%22%3E%0A%20%20%3Cmi%3EA%3C%2Fmi%3E%0A%20%20%3Cmo%3E%3D%3C%2Fmo%3E%0A%20%20%3Cmrow%3E%0A%20%20%20%20%3Cmo%3E%28%3C%2Fmo%3E%0A%20%20%20%20%3Cmunderover%3E%0A%20%20%20%20%20%20%3Cmo%3E%E2%88%91%3C%2Fmo%3E%0A%20%20%20%20%20%20%3Cmrow%3E%0A%20%20%20%20%20%20%20%20%3Cmi%3Ek%3C%2Fmi%3E%0A%20%20%20%20%20%20%20%20%3Cmo%3E%3D%3C%2Fmo%3E%0A%20%20%20%20%20%20%20%20%3Cmn%3E0%3C%2Fmn%3E%0A%20%20%20%20%20%20%3C%2Fmrow%3E%0A%20%20%20%20%20%20%3Cmo%3E%E2%88%9E%3C%2Fmo%3E%0A%20%20%20%20%3C%2Fmunderover%3E%0A%20%20%20%20%3Cmi%3E%3Cmsub%3E%0A%20%20%20%20%20%20%3Cmi%3Ea%3C%2Fmi%3E%0A%20%20%20%20%20%20%3Cmi%3Ek%3C%2Fmi%3E%0A%20%20%20%20%3C%2Fmsub%3E%0A%20%20%20%20%3C%2Fmi%3E%0A%20%20%20%20%3Cmo%3E%3Cmrow%3E%0A%20%20%20%20%20%20%3Cmrow%3E%0A%20%20%20%20%20%20%20%20*%3C%2Fmrow%3E%0A%20%20%20%20%20%20%3Cmsup%3E%0A%20%20%20%20%20%20%20%20%3Cmn%3E10%3C%2Fmn%3E%0A%20%20%20%20%20%20%20%20%3Cmrow%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cmo%3E-%3C%2Fmo%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cmi%3Ek%3C%2Fmi%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cmo%3E*%3C%2Fmo%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cmi%3Ej%3C%2Fmi%3E%0A%20%20%20%20%20%20%20%20%3C%2Fmrow%3E%0A%20%20%20%20%20%20%3C%2Fmsup%3E%0A%20%20%20%20%3C%2Fmrow%3E%0A%20%20%20%20%3C%2Fmo%3E%0A%20%20%20%20%3Cmo%3E%29%3C%2Fmo%3E%0A%20%20%3C%2Fmrow%3E%0A%3C%2Fmath%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E
How were "mglyph" and "malignmark" chosen as being special-cases? Are there
more elements that should be special-cased (the above page expects "mrow" and
"msub")?
Mike Smith had come to the conclusion of only allowing HTML in <mtext> in the
schema for Validator.nu, after discussion with some MathML people (?). If it
doesn't make sense to allow HTML in <mi>, <mn>, <mo> and <ms>, maybe the parser
shouldn't expect HTML there either.
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 29 June 2010 14:42:55 UTC