Replies: 1 comment 1 reply
-
|
I understand that CDATA sections should be respected only in foreign content, which are only SVG and MathML ( I've tested Chrome (120), Safary (17) and Firefox (121). You can use these data-uris below for handy testing. CDATA outside of foreign content should be treated as bogus comments, ending at the first This (svg) seems to render correctly in all browsers, This (mathml) seems to render correctly in Firefox ( It seems like this blink issue may be related. I think Firefox is doing the correct thing according to the specification? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Browsers
CDATAhandling inside foreign elements.The HTML5 specification indicates that CDATA sections exist within foreign elements and provides an example.
CDATAcan only exist within foreign elements.CDATAinside foreign elements.In Firefox this renders as expected, but in Safari and in Chrome the
CDATAsections are hidden as comments, which is how they would be parsed in normal HTML content.To highlight this discrepancy we can invert the comparison inside the
CDATAsection to<![CDATA[x>y3]]>. Now, in Firefox this still renders properly, but in Safari and Chrome we havey3]]>as text inside the Math render, because they are ending theCDATAsection at the first>as if it were a bogus comment.Beta Was this translation helpful? Give feedback.
All reactions