HTML::Template::Filter::URIdecode - Allow tmpl_ tags to be URL-encoded.
use HTML::Template::Filter::URIdecode 'ht_uri_decode'; my $t = HTML::Template->new( filename => 'zap.tmpl', filter => \&ht_uri_decode );
This filter primarily does URI-decoding of HTML::Template <tmpl_...> tags. It was designed for use Dreamweaver. Sometimes a <tmpl_var> tag is used in a way that would be invalid HTML:
<a href="<tmpl_var my_url>"></a>
Dreamweaver fixes the invalid HTML in this case by URL encoding it. Rather than fight it, I've used this filter for the last several years, and Dreamweavers practice of URL-encoding these tags has never been a problem since.
Dreamweaver may also automatically "fix" URLS like this by adding one or more "../" in front of the <tmpl_var_> tag. This filter strips those as well.
Mark Stosberg CPAN ID: MARKSTOS firstname.lastname@example.org
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
CGI::Application - a elegant web framework which integrates with HTML::Template.