-
Notifications
You must be signed in to change notification settings - Fork 258
Open
Description
The issue is found when test against wpt test: https://wpt.live//mathml/presentation-markup/mrow/semantics-003.html
Original:
<p>
annotation-xml 5:
<math>
<semantics>
<csymbol>Content MathML</csymbol>
<annotation-xml encoding="application/xhtml+xml">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>application/xhtml+xml</title>
</head>
<body>
<p>application/xhtml+xml</p>
</body>
</html>
</annotation-xml>
<annotation-xml encoding="application/mathml-presentation+xml">
<mtext>error</mtext>
</annotation-xml>
<annotation>error</annotation>
</math>
</p>
<p>
annotation-xml 6:
<math>
<semantics>
<csymbol>Content MathML</csymbol>
<annotation-xml encoding="text/html">
<html>
<head>
<title>text/html</title>
</head>
<body>
<p>text/html</p>
</body>
</html>
</annotation-xml>
<annotation-xml encoding="application/mathml-presentation+xml">
<mtext>error</mtext>
</annotation-xml>
<annotation>error</annotation>
</semantics>
</math>
</p>
rcdom's html2html output
<p>
annotation-xml 5:
<math>
<semantics>
<csymbol>Content MathML</csymbol>
<annotation-xml encoding="application/xhtml+xml">
<title>application/xhtml+xml</title>
</annotation-xml></semantics></math></p><p>application/xhtml+xml</p>
<annotation-xml encoding="application/mathml-presentation+xml">
<mtext>error</mtext>
</annotation-xml>
<annotation>error</annotation>
<p></p>
<p>
annotation-xml 6:
<math>
<semantics>
<csymbol>Content MathML</csymbol>
<annotation-xml encoding="text/html">
<title>text/html</title>
</annotation-xml></semantics></math></p><p>text/html</p>
<annotation-xml encoding="application/mathml-presentation+xml">
<mtext>error</mtext>
</annotation-xml>
<annotation>error</annotation>
<p></p>
The root cause looks to be that the tag is unexpected in the foreign content and the following function pop out the scope https://github.com/servo/html5ever/blob/main/html5ever/src/tree_builder/mod.rs#L1834
Metadata
Metadata
Assignees
Labels
No labels