@@ -7,7 +7,7 @@ use mro 'c3';
7
7
8
8
use Clone ();
9
9
10
- __PACKAGE__ -> mk_accessors(qw( allow ) );
10
+ __PACKAGE__ -> mk_accessors(qw( allow comment default rules script ) );
11
11
12
12
use HTML::Scrubber;
13
13
@@ -16,9 +16,13 @@ sub filter {
16
16
17
17
return if !defined $value ;
18
18
19
- my $allowed = $self -> allow || [];
19
+ my %params = ( allow => 0 );
20
+ foreach (qw( allow comment default rules script) ) {
21
+ my $val = $self -> $_ ;
22
+ $params {$_ } = $val if ( defined ($val ) );
23
+ }
20
24
21
- my $scrubber = HTML::Scrubber-> new( allow => $allowed );
25
+ my $scrubber = HTML::Scrubber-> new(%params );
22
26
23
27
return $scrubber -> scrub($value );
24
28
}
@@ -46,10 +50,21 @@ HTML::FormFu::Filter::HTMLScrubber - filter removing HTML markup
46
50
47
51
Remove HTML markup using L<HTML::Scrubber> .
48
52
53
+ All the functionality of L<HTML::Scrubber> can be accessed using
54
+ this module, other than the C<process > directive (which has a name
55
+ clash with the L<HTML::FormFu::Filter> framework).
56
+
57
+ For details of the filtering functionality see
58
+ L<HTML::Scrubber/allow> , L<HTML::Scrubber/comment> ,
59
+ L<HTML::Scrubber/default> , L<HTML::Scrubber/rules> and
60
+ L<HTML::Scrubber/script>
61
+
49
62
=head1 AUTHOR
50
63
51
64
52
65
66
+ Extended by Nigel Metheringham, C<[email protected] >
67
+
53
68
Based on the original source code of L<HTML::Widget::Filter::HTMLStrip> , by
54
69
55
70
0 commit comments