[whatwg] Common Subset
lachlan.hunt at lachy.id.au
Sat Dec 9 04:50:58 PST 2006
Alexey Feldgendler wrote:
> The HTML5 spec could somehow officially bless CDATA only when used like
> It would not harm because it is already interoperable.
It's technically already allowed because script and style elements are
defined to contain CDATA. So basically any string of text that doesn't
include '</' before the end tag is valid.
It's already interoperable because that whole string is passed to the
For more information, see
> But it seems somehow stupid to define that <![CDATA[ and ]]> are only
> allowed inside <script> after "//".
There is nothing to define beyond what is already in the spec. Just
like <!-- and --> isn't a real comment inside an HTML script element,
that isn't a real CDATA section.
Only Opera (AFAIK) even implemented support for CDATA sections in HTML.
So although that may suggest that they can be supported by browsers
without breaking anything, their use wouldn't be backwards compatible
with other legacy browsers, so they have to be forbidden.
More information about the whatwg