Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: trouble using html tidy with template files

__/ [ Sebastian Gohres ] on Saturday 04 March 2006 18:12 \__

> Hi!
> 
> First: sorry for my bad english :)
> 
> If I parse template files, html tidy remove all tags beginning with {
> for example:
> 
> before:
> 
> <select name="country" size="1">
> {section name=country loop=data}
> <option>{$data[country]}</option>
> {/section}
> </select>
> 
> after:
> 
> <select name="country" size="1">
> <option>{$data[country]}</option>
> </select>
> 
> Only the "{$data[country]}" is untouched, because html tidy take it for
> a value not for a tag.
> How can I teach html tidy to ignore text starting with { and ending with }?
> 
> Thanks for your help!
> 
> S. Gohres

Your only possibility, I suspect, would be to get Tidy from SourceForge,
change the source code, and then recompile. You are not using Tidy to
sanitise true (X)HTML in this case and I can't believe an option exists for
one among the many possible exceptions.

What, for example, if you wanted to "tidy" some PHP scripts? That would
require a different tool altogether -- one which descends onto files and
executes an actual program, in PHP.

I suggest you consider before/after copies of the file being tidy'ied and
merge after the code has been sanitised. This is by no means easy if the
files are large. It becomes tedious.

Hope it helps,

Roy

-- 
Roy S. Schestowitz      |    Download Othello: http://othellomaster.com
http://Schestowitz.com  |    SuSE Linux     |     PGP-Key: 0x74572E8E
 11:40am  up 5 days  7:18,  9 users,  load average: 0.12, 0.38, 0.50
      http://iuron.com - next generation of search paradigms

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index