W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > August 2011

[Bug 13604] CDATA sections are no allowed except in foreign content

From: <bugzilla@jessica.w3.org>
Date: Wed, 03 Aug 2011 20:20:24 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1QohvU-00037o-DT@jessica.w3.org>

David Carlisle <davidc@nag.co.uk> changed:

           What    |Removed                     |Added
                 CC|                            |davidc@nag.co.uk

--- Comment #1 from David Carlisle <davidc@nag.co.uk> 2011-08-03 20:20:24 UTC ---
(In reply to comment #0)
> The HTML5 spec is clear that "CDATA sections can only be used in foreign
> content (MathML or SVG)." [1].
> However, the polyglot spec is mostly silent on those. Tidy generates CDATA
> sections for inline style and script when it outputs XHTML. It would be good to
> make it that those CDATA markers must not be used.
> [1] http://www.w3.org/TR/html5/syntax.html#cdata-sections

the \\<![CDATA  markup doesn't generate a cdata section if used in an html
script element (as < doesn't start markup in that context) so that usage
doesn't contradict the fact that html doesn't allow cdata sections except in
foreign content.

Like using linebreaks in svg attributes, this usage will cause difference
between an htnl and xml DOM, but the difference is largely cosmetic, the
difference just being whether the first line of the script that contains a
jacascript comment has an empty comment (XML)  or a comment with the characters
<!CDATA (from html parsing).


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 Wednesday, 3 August 2011 20:20:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:59 UTC