I ran into this one the other day and thought I'd made a horrendous
typo in my template. No such luck, though. If a default value is
specified for a variable with URL or JS escaping, the default is
always printed (along with any value supplied by param()), and the
escaping doesn't happen. Example attached, unfortunately with
nothing approaching a patch to fix it. Seems to be broken in both
2.7 and 2.8, under perls 5.6.1 and 5.8.7 (though I admit I didn't
fill that matrix out completely).
--Ben Warfield
#!/usr/local/bin/perl -l
use HTML::Template;
$text = q{We're number <TMPL_VAR NAME="num" DEFAULT="one"
ESCAPE="URL">!};
$t = HTML::Template->new(scalarref=>\$text);
$t->param(num=>'two and 1/2');
print $t->output;
__END__
We're number onetwo and 1/2!
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users