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

RE: PHP support

From: Reitzel, Charlie <CReitzel@arrakisplanet.com>
Date: Fri, 2 Nov 2001 18:30:06 -0500
Message-ID: <B5C79DDBC655D311B6BD0008C7E64D76013C192A@exchange.arrakisplanet.com>
To: html-tidy@w3.org
I think what Tidy _can_ do for you is convert the HTML to XHTML and you can
pick up the code fragments with XSLT and, from there, feed them into a
JavaScript/VBScript pretty printer.  But the cure might be worse than the

take it easy,

-----Original Message-----
From: Klaus Johannes Rusch [mailto:KlausRusch@atmedia.net]
Sent: Friday, November 02, 2001 5:29 PM
To: html-tidy@w3.org
Subject: Re: PHP support

In <3BE2E176.5663BE3B@caldera.com>, Allan Clark <allanc@caldera.com> writes:


> Now, I know this isn't the best way, I'd love a better way, but how can
> we reliably pick up these code fragments and intelligently re-format the
> output?

thanks exactly my point, it cannot be done.

Macro functions as you suggest could help resolve quoting issues but cannot
something like

 <script type="application/javascript" language="Javascript1.2">
 var referer=document.referer; document.write("<"); if (referer)
 {document.write("IMG SRC=some.gif>");} else document.write("SPAN 
 color=red>Invalid source");}; document.writeln("</SPAN>");

Code like this is very popular with ad networks to circumvent ad filtering
software, so tidy will almost certainly see something like this on many

Fixing this code would require understanding, and in similar cases even 
modifying the program logic, which for general program code would be
equivalent to solving the Halting Problem.

Klaus Johannes Rusch
Received on Friday, 2 November 2001 18:29:15 UTC

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