http://qs1969.pair.com?node_id=680582

moritz has asked for the wisdom of the Perl Monks concerning the following question:

I quite like HTML::Template's and HTML::Template::Compiled's default_escape options.

They take care that any variable in the template is escaped unless specified otherwise. That's nice if you forget to escape your variables (and still don't like XSS).

Is there such an option for Template-Toolkit?

I'm not very familiar with Template toolkit, so I guess it would be some kind of a plugin, and you could write [% variable | unhtml %] or some such to prevent encoding.

(Actually tinita asked that on the 10. German Perl Workshop during her talk on web security and got no answer).