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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: encode html entities in TT format
by dipit (Sexton) on Jun 07, 2018 at 06:23 UTC | |
by haj (Vicar) on Jun 07, 2018 at 06:37 UTC |