1 package HTML::Zoom::FilterBuilder;
7 shift->{_template_object} ||= Template::Tiny->new;
11 my ($self, $vars) = @_;
12 my $parser = $self->_zconfig->parser;
13 my $tt = $self->_template_object;
17 return $_ unless $_->{type} eq 'TEXT';
18 my $unescape = $parser->html_unescape($_->{raw});
19 $tt->process(\$unescape, $vars, \my $out);
20 return { %$_, raw => $parser->html_escape($out) }
27 sub template_text_raw {
28 my ($self, $vars) = @_;
29 my $tt = $self->_template_object;
30 my $parser = $self->_zconfig->parser;
34 return $_ unless $_->{type} eq 'TEXT';
35 $tt->process(\($_->{raw}), $vars, \my $out);
36 return { %$_, raw => $out }