line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Shakan::Filter::HTMLScrubber; |
2
|
1
|
|
|
1
|
|
385
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
4
|
1
|
|
|
1
|
|
4
|
use Mouse; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
5
|
1
|
|
|
1
|
|
456
|
use HTML::Scrubber; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
81
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has scrubber => ( |
8
|
|
|
|
|
|
|
is => 'ro', |
9
|
|
|
|
|
|
|
isa => 'HTML::Scrubber', |
10
|
|
|
|
|
|
|
default => sub { HTML::Scrubber->new() }, |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub filter { |
14
|
2
|
|
|
2
|
0
|
4
|
my ($self, $val) = @_; |
15
|
2
|
|
|
|
|
10
|
$self->scrubber->scrub($val); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
6
|
no Mouse; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
19
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
__END__ |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 NAME |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
HTML::Shakan::Filter::HTMLScrubber - HTML::Scrubber filter |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 SYNOPSIS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
TextField(name => 'body', filters => [qw/HTMLScrubber/]) |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 DESCRIPTION |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
remove scripts from this field's value. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 AUTHORS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Tokuhiro Matsuno |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SEE ALSO |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
L<HTML::Scrubber> |
42
|
|
|
|
|
|
|
|