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

Re: TIDY for PHP3

From: Justin Farnsworth <jef@eyeintegrated.com>
Date: Thu, 02 Sep 1999 09:53:19 -0400
Message-ID: <37CE814F.375674C1@eyeintegrated.com>
To: Richard Allsebrook <Richard.Allsebrook@easysoft.com>
CC: html-tidy@w3.org
It is exactly those situations that you point out that
are breaking the code, as much of the dynamic page generation
does not allow the luxury of using the
<SCRIPT></SCRIPT> tags as the small elements of dynamic changes
are "embedded" in the HTML, that is, not multi-line.

Ideally, in the parser, when tidy encounters an opening
<?php tag, EVERYTHING is just saved on a node and printed
out verbatim until the closing ?> tag.  I would not want
tidy to decide upon how to format the server-side scripting
code.


----------
Richard Allsebrook wrote:
> 
> I've been using TIDY (as a plug-in for HTML Kit
> http://www.chami.com/html-kit/ ) to tidy up my PHP3 scripts for some time
> now.  I've found that you get less managing if you use a
> 
> <script language="php">
> </script>
> 
> tag for php elements that span more than one line
> 
> <? ?> can be used OK for simple element substitutions.
> 
> You're right though, it's still not perfect :-(
> 
> TIDY incorrectly mangles the following:
> 
> <A href="<? echo myUrl ?>Click Me</A>
> 
> to
> 
> <A href="&lt;? echo myUrl ?&gt;Click Me</A>
> 
> which breaks the PHP.
> 
> I also find it particularly annoying that TIDY re-indents <? ?> tags each
> time you tidy a document, but leaves <script></script> blocks alone.

-- 
Justin Farnsworth
Eye Integrated Communications
106 East Victoria Court - Suite A
Greenville, NC 27858 | Tel: (252) 353-0722
Received on Thursday, 2 September 1999 09:53:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:42 GMT