* Danny Warren <[EMAIL PROTECTED]> [2007-04-26 11:25]:
> A. Pagaltzis wrote:
> >* Danny Warren <[EMAIL PROTECTED]> [2007-04-26 04:45]:
> >>Quick question: at around 15 minutes in (while discussing TT)
> >>you mentioned the ability to set html scrubbing at a global
> >>level, and that there is something on CPAN to assist with
> >>this.
> >>
> >>I am interested in seeing what you were talking about, as I
> >>am about to go through and add '| html' to damn near every
> >>variable in my templates. 
> >
> >http://search.cpan.org/dist/Template-Stash-HTML-Entities/
> 
> Perfect, thank you!  Not sure how I missed that one in all my
> searching...

To be fair, I don’t think it’s perfect. It provides no escape
hatch (pun intended) at all, nor does it provide a mechanism to
pass any of the optional arguments to `encode` or use
`encode_numeric` instead. No surprise that it doesn’t provide a
way to pass in another stash to chain to, either, although you
can hack around that.

This is a works-for-me 5-liner wrapped in a distro and thrown on
CPAN. (Actually a lot of TT-related modules are like that. TT is
simply itself too big and messy.)

However, that’s not such a bad thing in this case. Look at the
source and you’ll find that it is really, really, REALLY trivial.
So just copypaste and tweak to taste.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to