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

Re: PHP support

From: Klaus Johannes Rusch <KlausRusch@atmedia.net>
Date: Fri, 2 Nov 2001 22:28:56 CET
Message-Id: <200111022144.QAA06834@tux.w3.org>
To: html-tidy@w3.org
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 fix
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 pages.

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 16:44:23 UTC

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