W3C home > Mailing lists > Public > www-validator@w3.org > January 2007

Re: [VE][64] Validator parses <.....> inside <script></script> need advise

From: David Dorward <david@dorward.me.uk>
Date: Thu, 18 Jan 2007 08:43:33 +0000
To: Jesper <struktor@gmail.com>, www-validator@w3.org
Message-ID: <20070118084333.GU8811@us-lot.org>

On Wed, Jan 17, 2007 at 08:12:20PM -0600, Brett Bieber wrote:

> You've understood the concept, but you aren't putting it together
> within the context of a javascript.  You need to use javascript
> comments to prevent a javascript parse error, because the CDATA
> declarations are not valid javascript/ecmascript.

... but only in XHTML masquerading as HTML[1], since an XML parser
will deal with the CDATA markers and only pass on the JavaScript to
the JavaScript engine.

[1] mutter, mutter, hate Appendix C, too much complication (i.e. lots)
for too little benefit (i.e. none).

-- 
David Dorward                                      http://dorward.me.uk
Received on Thursday, 18 January 2007 08:43:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:23 GMT