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

RE: HTML Tidy chokes on Javascript???

From: Charles Reitzel <creitzel@rcn.com>
Date: Wed, 02 Oct 2002 12:25:44 -0400
Message-Id: <4.3.2.7.2.20021002121456.02a5aac0@pop.rcn.com>
To: <danibe_@speedymail.org>
Cc: html-tidy@w3.org

I didn't see anything unusual in your config.  I did fix one script parsing 
bug in the library version.  I just tried it, and it worked for me.  Until 
we go live with that version, you can get it from my Tidy page at 
http://users.rcn.com/creitzel/tidy.html.

take it easy,
Charlie

At 12:05 AM 10/2/2002 -0400, you wrote:

>Thank you, Allan. I just tried your suggestion and it produced the same 
>error. (if it didn't, it would have been too easy... ;-))
>
>I believe this is a Tidy bug - unless I'm told that I did something wrong 
>in my config file.
>
>Thanks again,
>Daniel
>
>-----Original Message-----
>From: Allan (Reply to list only) [mailto:discard@chickenandporn.com]
>Sent: Tuesday, October 01, 2002 10:00 PM
>To: Daniel B.
>Cc: html-tidy@w3.org
>Subject: Re: HTML Tidy chokes on Javascript???
>
>
>Daniel;
>
>Tidy might be detecting an anchor (<A...>) in the middle of your
>javascript component.
>
>Try adding a space:
>
><    var i,j=doc.MM_p.length,
><        a=preload.arguments; for(i=0; i<a.length; i++)
>---
> >    var i,j=doc.MM_p.length,
> >        a=preload.arguments; for(i=0; i < a.length; i++)
>
>If this is true, then Tidy needs to learn better how to scipt these
>components.
>
>Allan
>
>
>"Daniel B." wrote:
> >
> > Hi!
> > It seems that I should not use HTML Tidy on pages that containg
> > Javascript? Or am I misunderstanding something here?
> >
> > (The HTML Tidy version that I'm using is "HTML Tidy for Windows (vers
> > 1st August 2002)".
> >
> > Thanks in advance,
> > Daniel
> >
> > Here is the test case in question:
> >
> > The original file (test1.htm):
> > ------------------------------
> > <html>
> > <head>
> > <title>Test 1</title>
> >
> > <script language="JavaScript" type="text/javascript">
> > <!--
> > function preload() { //v3.0
> >  var doc=document; if(doc.images){ if(!doc.MM_p) doc.MM_p=new Array();
> >    var i,j=doc.MM_p.length,a=preload.arguments; for(i=0; i<a.length;
> > i++)
> >    if (a[i].indexOf("#")!=0){ doc.MM_p[j]=new Image;
> > doc.MM_p[j++].src=a[i];}} }
> > //-->
> > </script>
> > </head>
> >
> > <body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"
> > background="bg.gif"
> > onLoad="preload('img1.gif','img2.gif','img3.gif','img4.gif','img5.gif'
> > ,'
> > img6.gif','img7.gif','img8.gif');">
> >
> > </body>
> > </html>
> >
> > HTML Tidy's output:
> > ------------------------------
> > <html>
> > <head>
> > <meta name="generator" content="HTML Tidy for Windows (vers 1st August
>
> > 2002), see www.w3.org"> <title>Test 1</title>
> >
> > <script language="JavaScript" type="text/javascript">
> > <!--
> > function preload() { //v3.0
> >  var doc=document; if(doc.images){ if(!doc.MM_p) doc.MM_p=new Array();
> >    var i,j=doc.MM_p.length,a=preload.arguments; for(i=0; i </script>
> > </head>
> > <body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"
> > background="bg.gif"
> >
>onload="preload('img1.gif','img2.gif','img3.gif','img4.gif','img5.gif','
> > img6.gif','img7.gif','img8.gif');">
> > </body>
> > </html>
> >
> > HTML Tidy was invoked with the following config file:
> > ======================================================
> > indent-spaces:                   2
> > wrap:                            0
> > wrap-attributes:                 no
> > wrap-script-literals:            no
> > wrap-sections:                   yes
> > wrap-asp:                        yes
> > wrap-jste:                       yes
> > wrap-php:                        yes
> > literal-attributes:              no
> > tab-size:                        8
> > markup:                          yes
> > quiet:                           no
> > tidy-mark:                       yes
> > indent:                          no
> > indent-attributes:               no
> > hide-endtags:                    no
> > input-xml:                       no
> > output-xml:                      no
> > output-xhtml:                    no
> > output-html:                     no
> > add-xml-pi:                      no
> > add-xml-decl:                    no
> > assume-xml-procins:              no
> > raw:                             yes
> > uppercase-tags:                  no
> > uppercase-attributes:            no
> > bare:                            no
> > clean:                           no
> > logical-emphasis:                no
> > word-2000:                       no
> > drop-empty-paras:                yes
> > drop-font-tags:                  no
> > drop-proprietary-attribute:      no
> > enclose-text:                    no
> > enclose-block-text:              no
> >
> > add-xml-space:                   no
> > fix-bad-comments:                yes
> > split:                           no
> > break-before-br:                 no
> > numeric-entities:                no
> > quote-marks:                     no
> > quote-nbsp:                      yes
> > quote-ampersand:                 yes
> > write-back:                      no
> > keep-time:                       yes
> > show-warnings:                   yes
> >
> > show-body-only:                  no
> >
> > new-inline-tags:                 names
> > new-blocklevel-tags:             names
> > new-empty-tags:                  names
> > new-pre-tags:                    names
> > char-encoding:                   ascii
> > input-encoding:                  latin1
> > output-encoding:                 ascii
> >
> > ncr:                             yes
> > doctype:                         auto
> > fix-backslash:                   yes
> > gnu-emacs:                       no
> > fix-uri:                         yes
> > lower-literals:                  yes
> > hide-comments:                   no
> > indent-cdata:                    no
> > force-output:                    no
> > show-errors:                     6
> > ascii-chars:                     yes
> > join-classes:                    no
> > join-styles:                     yes
> > escape-cdata:                    no
> > repeated-attributes:             -last
> > output-bom:                      auto
> > replace-color:                   no
> >
> > accessibility-check:             0
Received on Wednesday, 2 October 2002 12:14:25 UTC

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