RE: How do I get Tidy to ignore my PHP code blocks

Ah, yes but:

<title>test</title>
<?
echo "This ia a <test>";
echo "This is another test...";
?>

gets mangled to:

<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
  <HEAD>
    <TITLE>
      test
    </TITLE>
    <?
    echo "This ia a &lt;test?>
  </HEAD>
  <BODY>
    "; echo "This is another test..."; ?&gt;
  </BODY>
</HTML>


BTW, I'm using tidy through the excellent HTML kit (build 254).  I talked
with Chami (the programs author) and he put me on to you guys...


Richard Allsebrook
Webmaster - Easysoft Limited
http://www.easysoft.com <http://www.easysoft.com> 
* No 3 the Embankments, Leeds LS1 4BJ, UK
*+44 0113 2220400


		-----Original Message-----
		From:	Dave Raggett [mailto:dsr@w3.org]
		Sent:	22 July 1999 11:38
		To:	Richard Allsebrook
		Cc:	html-tidy@w3.org
		Subject:	Re: How do I get Tidy to ignore my PHP code
blocks

		On Thu, 22 Jul 1999, Richard Allsebrook wrote:

		> How do I get Tidy to ignore my PHP code blocks
		> 
		> A PHP code block is defined as
		> 
		> <? Php code goes here ?>

		Tidy recognizes <? ...?> as an XML Processing instruction
		and preserves these, e.g. the test file

		  <title>test</title>
		  <p>Hello <?brave new?> world.

		is tidied to

		  <html>
		  <head>
		  <title>test</title>
		  </head>
		  <body>
		  <p>Hello <?brave new?> world.</p>
		  </body>
		  </html>

		Do you want a means to strip processing instructions?

		Regards,

		-- Dave Raggett <dsr@w3.org>
http://www.w3.org/People/Raggett
		phone: +44 122 578 2984 (or 2521) +44 385 320 444 (gsm
mobile)
		World Wide Web Consortium (on assignment from HP Labs)

Received on Thursday, 22 July 1999 06:51:41 UTC