File Coverage

blib/lib/DTL/Fast/Filter/Escape.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 20 21 95.2


line stmt bran cond sub pod time code
1             package DTL::Fast::Filter::Escape;
2 5     5   1892 use strict;
  5         10  
  5         115  
3 5     5   22 use utf8;
  5         9  
  5         19  
4 5     5   99 use warnings FATAL => 'all';
  5         10  
  5         140  
5 5     5   22 use parent 'DTL::Fast::Filter';
  5         10  
  5         24  
6              
7             $DTL::Fast::FILTER_HANDLERS{escape} = __PACKAGE__;
8             $DTL::Fast::FILTER_HANDLERS{force_escape} = __PACKAGE__;
9              
10             #@Override
11             sub filter
12             {
13 8     8 0 13 shift; # self
14 8         15 shift->{safe} = 1; # filter_manager
15 8         47 return DTL::Fast::html_protect(shift);
16             }
17              
18             1;