package Celaenito::Template::Plugin::URIEscape;
use strict;
use warnings;
use URI::Escape;
use base 'Template::Plugin';

sub new {
    my ($class, $context, $str, $opts) = @_;
    $opts ||= {};

    if ($opts->{unescape}) {
	uri_unescape($str);
    }
    else {
	uri_escape($str, $opts->{unsafe});
    }
}

1;

