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

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

From: Dave Raggett <dsr@w3.org>
Date: Thu, 22 Jul 1999 11:38:24 +0100 (GMT Daylight Time)
To: Richard Allsebrook <Richard.Allsebrook@easysoft.com>
cc: html-tidy@w3.org
Message-ID: <Pine.WNT.4.10.9907221133570.-359017@hazel.hpl.hp.com>
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:38:29 GMT

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