1 package HTML::Zoom::FilterBuilder;
4 use warnings FATAL => 'all';
8 shift->{_template_object} ||= Template::Tiny->new;
12 my ($self, $vars) = @_;
13 my $parser = $self->_zconfig->parser;
14 my $tt = $self->_template_object;
18 return $_ unless $_->{type} eq 'TEXT';
19 my $unescape = $parser->html_unescape($_->{raw});
20 $tt->process(\$unescape, $vars, \my $out);
21 return { %$_, raw => $parser->html_escape($out) }
28 sub template_text_raw {
29 my ($self, $vars) = @_;
30 my $tt = $self->_template_object;
31 my $parser = $self->_zconfig->parser;
35 return $_ unless $_->{type} eq 'TEXT';
36 $tt->process(\($_->{raw}), $vars, \my $out);
37 return { %$_, raw => $out }