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

(-)a/C4/Scrubber.pm (+34 lines)
Lines 88-93 my %scrubbertypes = ( Link Here
88
            },
88
            },
89
        ],
89
        ],
90
    },
90
    },
91
    opac => {
92
        allow => [
93
            qw(
94
                div span h1 h2 h3 h4 h5 h6 p br
95
                ul ol li dl dt dd
96
                a img svg
97
                strong b em i u
98
                hr
99
            )
100
        ],
101
        rules => [
102
            div => {
103
                class => qr/^[\w\s\-_]+$/,
104
                id    => qr/^[\w\-_]+$/,
105
            },
106
107
            span => {
108
                class => qr/^[\w\s\-_]+$/,
109
                id    => qr/^[\w\-_]+$/,
110
            },
111
            'svg' => {
112
                'id'                  => qr/^[\w\-_]+$/,
113
                'class'               => qr/^[\w\s\-_]+$/,
114
                'data-barcode'        => qr/^[\w\-_]+$/,
115
                'data-barcode-format' => qr/^[\w\-_]+$/,
116
            },
117
            'img' => {
118
                'src'   => qr/^(?:https?:\/\/|\/)/i,
119
                'alt'   => 1,
120
                'class' => qr/^[\w\s\-_]+$/,
121
                'id'    => qr/^[\w\-_]+$/,
122
            },
123
        ],
124
    }
91
);
125
);
92
126
93
sub new {
127
sub new {
(-)a/opac/opac-virtual-card.pl (-1 / +5 lines)
Lines 76-81 my $content = C4::Letters::GetPreparedLetter( Link Here
76
    )
76
    )
77
);
77
);
78
78
79
my $scrubber = C4::Scrubber->new('opac');
80
my $scrubbed = $scrubber->scrub( $content->{content} );
81
82
$content->{content} = $scrubbed;
83
79
$template->param(
84
$template->param(
80
    virtualcardview => 1,
85
    virtualcardview => 1,
81
    patron          => $patron,
86
    patron          => $patron,
82
- 

Return to bug 40659