In a HTML5 document, the MathML fragment is completely broken after cleanup. For example:
<!DOCTYPE html>
<html lang="fr">
<head>
<title>HTML5 SVG and MathML with no namespaces should be rendered in the output.</title>
</head>
<body>
<h1>The quadratic formula</h1>
<p>
<math>
<mi>x</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mo form="prefix">−</mo>
<mi>b</mi>
<mo>±</mo>
<msqrt>
<msup>
<mi>b</mi>
<mn>2</mn>
</msup>
<mo>−</mo>
<mn>4</mn>
<mo></mo>
<mi>a</mi>
<mo></mo>
<mi>c</mi>
</msqrt>
</mrow>
<mrow>
<mn>2</mn>
<mo></mo>
<mi>a</mi>
</mrow>
</mfrac>
</math>
</p>
<h1>My first SVG</h1>
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<title>This is the title</title>
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4"
fill="yellow" />
</svg>
</body>
</html>
The result fragment is:
<math
xmlns="http://www.w3.org/1998/Math/MathML">
<mi>x</mi>
<mo>=</mo>
<mfrac> </mfrac>
<mrow>
<mo
form="prefix">−</mo>
<mi>b</mi>
<mo>±</mo>
<msqrt> </msqrt>
<msup>
<mi>b</mi>
<mn>2</mn>
</msup>
<mo>−</mo>
<mn>4</mn>
<mo></mo>
<mi>a</mi>
<mo></mo>
<mi>c</mi>
</mrow>
<mrow>
<mn>2</mn>
<mo></mo>
<mi>a</mi>
</mrow>
</math>
Please note how the "mfrac", or "msqrt" is closed before its actual content.
Thank you,
Dan
In 2.10 it works fine.
Hi Dan,
Thanks for the report - I can confirm the issue.
This can be fixed by uncommenting the following line in Html5TagProvider:
This functionality was removed as it was causing some other issues, but I think it can be reinstated.
S