W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2002

Re: HTML-KIT 292 TIDY problem with JavaScript code

From: Charles Reitzel <creitzel@rcn.com>
Date: Fri, 06 Dec 2002 20:27:47 -0500
Message-Id: <4.3.2.7.2.20021206202248.02d0e378@pop.rcn.com>
To: "Dave Cannarella" <dave.cannarella@horizonair.com>
Cc: html-tidy@w3.org

Can you send the sample input as an attachment?  When a DOCTYPE or HTML tag 
is included, the text gets chopped for some reason.

Those are legitimate warnings.  If you have an end tag within a <SCRIPT> 
element, you should escape it.  E.g.

<script type="text/javascript" language="Javascript>
   document.write( "<p>foo<\/p>" );
</script>

Note the <\/p>.

Also, in URLS, you should use the &amp; character entity to represent URL 
argument delimiters.  E.g.

<a href="/foo?a=arg1&amp;b=arg2">Foo</a>

take it easy,
Charlie

At 04:19 PM 12/6/2002 -0800, Dave Cannarella wrote:

>I just downloaded HTML-KIT build 292 and have some TIDY problems that did 
>not ccur in build 290. I received error and warning messages in JavaScript 
>code hat is being interpreted as HTML. Do you have any suggestions? Below 
>is sample code.
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>Hello world
>Below are errors and warnings:
>'<' + '/' + letter not allowed here
>unescaped & which should be written as &amp;
>unescaped & or unknown entity "&parent.frames.length"
>unescaped & or unknown entity "&i"
Received on Friday, 6 December 2002 20:24:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:39:48 UTC