W3C home > Mailing lists > Public > www-html@w3.org > January 2003

Re: HTML or XHTML - why do you use it?

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 8 Jan 2003 09:42:33 +0000 (GMT)
To: Toby A Inkster <tobyink@goddamn.co.uk>
Cc: "Peter Foti (PeterF)" <PeterF@SystolicNetworks.com>, "'www-html@w3.org'" <www-html@w3.org>
Message-ID: <Pine.LNX.4.21.0301080941190.11913-100000@dhalsim.dreamhost.com>

On Wed, 8 Jan 2003, Toby A Inkster wrote:
>
> On Wed, Jan 08, 2003 at 12:57:57AM +0000, Ian Hickson wrote:
> | The problem is that the following string:
> | 
> |    <script> <!--
> |      work();
> |    // --> </script>
> | 
> | ...will be treated differently depending on whether it is supposed to be
> | HTML or whether it is supposed to be XHTML.
> 
> True -- so use this instead:
> 
>    <script>
>      work();
>    </script>
> 
> Perfectly valid in both HTML 3.2, HTML 4.0, HTML 4.01, XHTML 1.0, HTML 1.1 
> and the latest XHTML 2.0 draft.

That's what I said. "never use <!-- --> in <script> or <style>".

But it's one of the many things people get wrong, and one of the many
things that will screw up when people change their text/html XHTML files
to use a real XML MIME type.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 8 January 2003 04:42:35 GMT

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