line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::HTML::Strip; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
95247
|
use 5.006; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
81
|
|
4
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
121
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
2692
|
use Template::Plugin::Filter; |
|
2
|
|
|
|
|
10617
|
|
|
2
|
|
|
|
|
66
|
|
9
|
2
|
|
|
2
|
|
17
|
use base 'Template::Plugin::Filter'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
153
|
|
10
|
2
|
|
|
2
|
|
1611
|
use HTML::Strip; |
|
2
|
|
|
|
|
20035
|
|
|
2
|
|
|
|
|
420
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $FILTER_NAME = 'html_strip'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub init { |
15
|
4
|
|
|
4
|
1
|
10177
|
my $self = shift; |
16
|
|
|
|
|
|
|
|
17
|
4
|
|
|
|
|
16
|
$self->{_DYNAMIC} = 1; |
18
|
4
|
|
66
|
|
|
40
|
$self->install_filter($self->{_ARGS}->[0] || $FILTER_NAME); |
19
|
|
|
|
|
|
|
|
20
|
4
|
|
|
|
|
173
|
return $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub filter { |
24
|
4
|
|
|
4
|
1
|
352
|
my ($self, $text, undef, $config) = @_; |
25
|
4
|
|
|
|
|
19
|
$config = $self->merge_config($config); |
26
|
|
|
|
|
|
|
|
27
|
4
|
|
|
|
|
45
|
my $hs = HTML::Strip->new(%$config); |
28
|
4
|
|
|
|
|
171
|
return $hs->parse($text); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |