|
Hi,
I have been using Template::Stash::EscapeHTML and recetly I tried to make a BLOCK MACRO for some HTML that is used in several places and it turned out the content of the macro gets escaped. This seems strage to me, so my question is: Is this a bug or a feature.
In the following example the <b> and </b> tags in the MACRO definition get escaped.
use strict;
use warnings;
use Template;
use Template::Stash::EscapeHTML;
my $template = Template->new(
STASH => Template::Stash::EscapeHTML->new(),
);
my $data = {};
my $contents = <<'END';
[% MACRO hi(t) BLOCK %]
xx <b>[% t %]</b> xx
[% END %]
[% hi('one') %]
[% hi('two') %]
END
print $template->process(\$contents, $data), "\n";
Should I report this as a bug?
Kind reguards,
Eduard
|