- From: Daniel B. <danibe_@speedymail.org>
- Date: Tue, 1 Oct 2002 21:43:46 -0400
- To: "'HTML Tidy'" <html-tidy@w3.org>
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 Tuesday, 1 October 2002 21:40:38 UTC