morgon has asked for the wisdom of the Perl Monks concerning the following question:
I am using the template toolkit to produce html and xml.
When e.g. producing html I use filters to properly escape template-variables like this:
Now on my templates basically all variables would need to go through such a filter and I find it tedious to add the FILTER-directive to all variables, so I wonder if there is a way to configure TT in such a way that it applies a default-filter to all variables that do not explicitly set one.<h1>[% hubba FILTER html %]</h1>
Many thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Default filter in TT
by mithaldu (Monk) on Jan 01, 2011 at 21:20 UTC | |
by morgon (Priest) on Jan 02, 2011 at 21:33 UTC | |
by mithaldu (Monk) on Jan 02, 2011 at 22:18 UTC | |
|
Re: Default filter in TT
by tinita (Parson) on Jan 01, 2011 at 18:50 UTC | |
by morgon (Priest) on Jan 01, 2011 at 19:00 UTC | |
by tinita (Parson) on Jan 01, 2011 at 19:04 UTC | |
|
Template::AutoFilter
by mithaldu (Monk) on Jan 02, 2011 at 16:57 UTC | |
by morgon (Priest) on Jan 07, 2011 at 16:32 UTC | |
by mithaldu (Monk) on Jan 08, 2011 at 13:11 UTC | |
|
Re: Default filter in TT
by Your Mother (Archbishop) on Jan 01, 2011 at 19:41 UTC | |
by tinita (Parson) on Jan 01, 2011 at 19:48 UTC | |
by Your Mother (Archbishop) on Jan 01, 2011 at 20:02 UTC | |
|
Re: Default filter in TT
by Rhandom (Curate) on Jan 26, 2011 at 17:25 UTC |