View | Details | Raw Unified | Return to bug 36328
Collapse All | Expand All

(-)a/C4/Scrubber.pm (-1 / +3 lines)
Lines 29-35 use C4::Context; Link Here
29
my %scrubbertypes = (
29
my %scrubbertypes = (
30
    default => {}, # place holder, default settings are below as fallbacks in call to constructor
30
    default => {}, # place holder, default settings are below as fallbacks in call to constructor
31
    tag     => {},                                               # uses defaults
31
    tag     => {},                                               # uses defaults
32
    comment => { allow => [qw[ p b i u hr br em big small strong span div ]] },
32
    comment => { allow => [qw( br b i em big small strong )], },
33
    note    => { allow => [qw[ p b i u hr br em big small strong span div ]] },
33
    staff   => {
34
    staff   => {
34
        default => [ 1 => { '*' => 1 } ],
35
        default => [ 1 => { '*' => 1 } ],
35
        comment => 1,
36
        comment => 1,
Lines 49-54 sub new { Link Here
49
        rules   => exists $settings->{rules} ? $settings->{rules} : [],
50
        rules   => exists $settings->{rules} ? $settings->{rules} : [],
50
        default => exists $settings->{default} ? $settings->{default} : [ 0 => { '*' => 0 } ],
51
        default => exists $settings->{default} ? $settings->{default} : [ 0 => { '*' => 0 } ],
51
        comment => exists $settings->{comment} ? $settings->{comment} : 0,
52
        comment => exists $settings->{comment} ? $settings->{comment} : 0,
53
        note    => exists $settings->{note} ? $settings->{note} : 0,
52
        process => 0,
54
        process => 0,
53
    );
55
    );
54
    return $scrubber;
56
    return $scrubber;
(-)a/t/Scrubber.t (-2 / +1 lines)
Lines 82-85 if ($@) { Link Here
82
    pass("Test should have failed on entry of 'Client' and it did. YAY!");
82
    pass("Test should have failed on entry of 'Client' and it did. YAY!");
83
}
83
}
84
84
85
is( C4::Scrubber->new('comment')->scrub('<span>Allow span</span>'), '<span>Allow span</span>' );
85
is( C4::Scrubber->new('note')->scrub('<span>Allow span</span>'), '<span>Allow span</span>' );
86
- 

Return to bug 36328