I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-11-02 08:09:44-08 by eduard
Template::Stash::EscapeHTML with Macro's
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
Direct Responses: Write a response