I HAVE USED URI | HTML
Please refrain from shouting in the monastery. This is a place of quiet contemplation.
Here is an SSCCE:
use strict; use warnings; use Test::More tests => 1; use Template; my $foo = 'some<stuff_to"be>escaped'; my $want = 'some%3Cstuff_to%22be%3Eescaped'; my $template = Template->new; my $tmpl = '[% foo | uri %]'; my $out; $template->process (\$tmpl, { foo => $foo }, \$out) or die $template->error (); is ($out, $want);
See also How to ask better questions using Test::More and sample data.
In reply to Re: encode html entities in TT format
by hippo
in thread I want to encode html entities in TT format to remove cross site scripting, I have followed the articles here for xss but could not able to implement in my code.
by dipit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |