You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Situation:
Consider the following HTML5 document, which produces no warnings at https://validator.w3.org/nu/ (Tidy can properly handle most plausible warnings I could make it generate, but for the purpose of isolating variables, I made it not generate any):
<!DOCTYPE html><htmllang="en"><head><linkrel="stylesheet" href="https://fred-wang.github.io/mathml.css/mathml.css"><title>Circle equation</title></head><body><p>
The equation
<mathdisplay=inline><mi>y</mi><mo>=</mo><mo>±</mo><msqrt><msup><mi>r</mi><mn>2</mn></msup><mo>-</mo><msup><mi>x</mi><mn>2</mn></msup></msqrt></math>
produces a circle with radius <mathdisplay=inline><mi>r</mi></math>:
</p><svgwidth="10em" height="10em" viewBox="0 0 100 100"><desc>A circle</desc><circlecx="50" cy="50" r="40" fill="none" stroke="blue" stroke-width="1" />
</svg></body></html>
I ran this through tidy -asxhtml.
Expected result:
A valid XML document containing HTML, as described in the HTML spec. In particular, namespaces of the svg and math elements and their descendants should be accurate.
Actual result:
I get the two spurious warnings mentioned in #1046, but it also does not add the proper namespace directives to the math or svg elements. It adds a document-wide xmlns directive, but math and svg are not actually elements in the html namespace, so these are incorrect; it should add xmlns attributes to these as well.
Further note:
I expect both this and #1046 share the same cause; in particular, Tidy is trying to treat these elements as though the were HTML elements, which they are not.
The text was updated successfully, but these errors were encountered:
Version: HTML Tidy for Linux version 5.7.45
Situation:
Consider the following HTML5 document, which produces no warnings at https://validator.w3.org/nu/ (Tidy can properly handle most plausible warnings I could make it generate, but for the purpose of isolating variables, I made it not generate any):
I ran this through
tidy -asxhtml
.Expected result:
A valid XML document containing HTML, as described in the HTML spec. In particular, namespaces of the
svg
andmath
elements and their descendants should be accurate.Actual result:
I get the two spurious warnings mentioned in #1046, but it also does not add the proper namespace directives to the
math
orsvg
elements. It adds a document-widexmlns
directive, butmath
andsvg
are not actually elements in the html namespace, so these are incorrect; it should addxmlns
attributes to these as well.Further note:
I expect both this and #1046 share the same cause; in particular, Tidy is trying to treat these elements as though the were HTML elements, which they are not.
The text was updated successfully, but these errors were encountered: