HTML::Template::Filter::URIdecode - Allow tmpl_ tags to be URL-encoded.


NAME

HTML::Template::Filter::URIdecode - Allow tmpl_ tags to be URL-encoded.

Back to Top


SYNOPSIS

  use HTML::Template::Filter::URIdecode 'ht_uri_decode';
  my $t = HTML::Template->new(
    filename => 'zap.tmpl',
    filter   => \&ht_uri_decode
   );

Back to Top


DESCRIPTION

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.

Back to Top


AUTHOR

    Mark Stosberg
    CPAN ID: MARKSTOS
    mark@summersault.com

Back to Top


COPYRIGHT

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.

Back to Top


SEE ALSO

perl(1).

the HTML::Template manpage

the CGI::Application manpage - a elegant web framework which integrates with HTML::Template.

Back to Top

 HTML::Template::Filter::URIdecode - Allow tmpl_ tags to be URL-encoded.