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

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13604

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).

David

-- 
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