[Catalyst] Views and escaping HTML

Peter Edwards peter at dragonstaff.co.uk
Thu Apr 1 20:35:50 GMT 2010


On 1 April 2010 19:58, Mesdaq, Ali <amesdaq at websense.com> wrote:

> Actually I was not aware of built-in | html escaping. Where is the
> documentation for that? Or better yet where exactly is that built-in? Is
> that a catalyst method or TT? Now the authors question makes A LOT more
> sense. I guess I must be doing things the 1999 way.
>

http://template-toolkit.org/docs/manual/Filters.html

[% somevariable | html %]

is a shorthand for

[% somevariable FILTER html %]

Another handy manpage is on virtual methods, the equivalent of Perl
operators like map, grep, sort on arrays and hashes
http://template-toolkit.org/docs/manual/VMethods.html

particularly the custom ones
http://template-toolkit.org/docs/manual/VMethods.html#section_Defining_Cust=
om_Virtual_Methods
which let you add new operators, e.g. for formatting currency

Cheers, Peter
http://perl.dragonstaff.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100401/fed03=
4cc/attachment.htm


More information about the Catalyst mailing list