W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2003

Re: HTML Tidy bug?

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 09 Sep 2003 05:27:02 +0200
To: James Alarie <jalarie@flint.umich.edu>
Cc: html-tidy@w3.org
Message-ID: <3f6d428e.832585724@smtp.bjoern.hoehrmann.de>

* James Alarie wrote:
>Try this:
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
><html>
>  <head>
>    <title>Title</title>
>  </head>
>  <body>
>    <script type="text/javascript">
>      <!-- Hide this code from non-JavaScript browsers
>        max=10;
>        for (i=0; i<max; i++) {
>          document.write(i);
>        }
>      // End hiding -->
>    </script>
>  </body>
></html>

From a XHTML position, this would indeed hide the script but rather from
all browsers not just from non-JavaScript browsers as anything betwen
<!----> is recognized as a real comment and thus ignored by the user
agent. XHTML 1.0 advises to use external scripts if they contain <, & or
]]>.
Received on Monday, 8 September 2003 23:27:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:54 UTC