in reply to default_escape for Template::Toolkit?
It maintains a stack of filters, and there's no reason why you couldn't pre-initialize it with a default filter.[% GETFILTER '::html_escape' %] ... all gets are now filtered through the function ::html_escape ... Hello, [% name %] [% GETFILTER '' %] ... turn off filtering ... [% END %] ... previous filtering resumes ... [% END %]
At the time it seemed to generate some interest, although not enough for me to do much more with it. Perhaps by now some form of it has made it's way into the latest release - I haven't checked.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: default_escape for Template::Toolkit?
by moritz (Cardinal) on Apr 15, 2008 at 17:34 UTC | |
by pc88mxer (Vicar) on Apr 15, 2008 at 19:20 UTC |