Re: [htmltmpl] xml complant tags
Brought to you by:
samtregar
From: Sam T. <sa...@tr...> - 2003-12-08 22:51:31
|
On Mon, 8 Dec 2003, paul POULAIN wrote: > For instance, h::t tags are not html valid <TMPL_VAR name="X"> is NOT > valid. It should be : <TMPL_VAR name="X"/>. You mean "XML valid" right? HTML::Template has nothing to do with XML so of course it's not valid XML! > Is it possible to add this feature in a future version ? (with <TMPL_VAR > > still possible to avoid rewritting all templates, of course) You can do it yourself with a filter. Something like (untested): sub allow_trailing_slash { my $text = shift; $$text =~ m!(<tmpl_[^>]*)/>!$1>!g; } $t = HTML::Template->new(filter => \&allow_trailing_slash, ...); -sam |