W3C home > Mailing lists > Public > www-html@w3.org > June 2001

RE: XHTML's reception

From: Piers Williams <PiersW@zinc.co.uk>
Date: Tue, 26 Jun 2001 12:50:50 +0100
Message-ID: <43EE231FE878D4118B0B00062939A44E022964@MERCURY>
To: www-talk@w3.org
Cc: www-html@w3.org


> At 12:21 2001-06-25 +0200, Clover Andrew wrote:
> >On a non-political practical note, how about:
> >
> >   <script type="text/javascript"><!-- // --><![CDATA[
> >     ...
> >   //]]></script>
> >

And Christian Ottosson wrote:
> Would even
> 
>    <script type="text/javascript">//<![CDATA[
>      ...
>    //]]></script>
> 
> be enough and specs following (with the same aesthetical 
> reservations)?

However neither are quite right. Whilst they both deal admirably with
commenting out the CDATA tags from scripting browers, only Clover's attempts
to also comment out the contents of the script tags from non-scripting
browsers (as per http://www.w3.org/TR/html4/interact/scripts.html#h-18.3.2),
however he omits the --> ending that (i think i'm right in saying) browsers
like IE2 require (of course if they just key off the next '>' - using the
]]> to be precise, then Clover's is fine).

To keep these elderly browsers happy, what you really want is:
   <script type="text/javascript"><!-- //<![CDATA[
     ...
   //]]>--></script>

But that then comments out the CDATA bit for the XML parsers... Hmm, messy.
Received on Tuesday, 26 June 2001 07:42:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:48 GMT