Template::Plugin::Text::Filter::URI - Filter a string to meet URI requirements


Template-Plugin-Text-Filter-URI documentation Contained in the Template-Plugin-Text-Filter-URI distribution.

Index


Code Index:

NAME

Top

Template::Plugin::Text::Filter::URI - Filter a string to meet URI requirements

SYNOPSIS

Top

  [% USE Text::Filter::URI %]
  <a href="/blog/[% "a string with föreign chäräcters" | filter_uri %]">Link</a>

  # Output

  <a href="/blog/a-string-with-foreign-characters">Link</a>

This filter can be useful if you have a string which should be included in an url but contains illegal characters.

See Text::Filter::URI for more information on this process.

AUTHOR

Top

Moritz Onken, <onken at houseofdesign.de>

BUGS

Top

Please report any bugs or feature requests to bug-template-plugin-text-filter-uri at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Template-Plugin-Text-Filter-URI. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Template::Plugin::Text::Filter::URI

COPYRIGHT & LICENSE

Top


Template-Plugin-Text-Filter-URI documentation Contained in the Template-Plugin-Text-Filter-URI distribution.
package Template::Plugin::Text::Filter::URI;

use warnings;
use strict;

use base 'Template::Plugin';
use Text::Filter::URI qw( filter_uri );

our $VERSION = '0.02';


sub new {
  my ($self, $context) = @_;
  $context->define_filter('filter_uri', \&filter_uri, '');
  return $self;
}


1; # End of Template::Plugin::Text::Filter::URI