[Petal] Petal and HTML Tidy

William McKee william@knowmad.com
Wed, 7 Aug 2002 15:55:39 -0400


Jean-Michel,

So, I've taken your advice and started using HTML Tidy on my templates. 
Yes, in many cases, it has helped fix some problems I was having with my 
templates being properly parsed.

However, it does generate lots of warnings about unknown attributes when I 
use the TAL-style lanaguage. Any suggestions for configuring tidy to 
ignore these? Also, I have found an example where tidy really screws up my 
templates. Given the following:
        <a 
href="mailto:%3C?petal:var%20name=">&quot;petal:content=&quot;encode:email&
quot;&gt;Email</a>

Tidy turns it into:
	<a href="mailto:<?petal:var name="email"?>" 
petal:content="encode:email">Email</a></td>

Any solutions for this situation where tidy is obviously trying to format 
my attributes? My tidy config file is included at the end of this message.

Also, I never heard back about needing to pass the taint value to includes 
statements. It seems like now that taint and all other instantiation 
settings are now global, this setting is ignored. If this is the case, 
docs need update.

Thanks,
William

------------------------------------------------
// WLM's config file for HTML Tidy
// based on the sample config file for HTML tidy
indent: auto
indent-spaces: 2
wrap: 0
markup: yes
output-xhtml: yes
literal-attributes: yes
clean: yes
output-xml: no
input-xml: no
show-warnings: yes
numeric-entities: yes
quote-marks: yes
quote-nbsp: yes
quote-ampersand: no
break-before-br: no
uppercase-tags: no
uppercase-attributes: no
char-encoding: latin1
new-inline-tags: petal
new-blocklevel-tags: 
new-empty-tags: 

-- 
 Lead Developer
 Knowmad Services Inc. || Internet Applications & Database Integration
 http://www.knowmad.com