Bug 40659: Change Scrubber profile name to opac_virtual_card

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2025-11-17 15:58:31 +00:00
parent e789a21fd5
commit 4db8cf6fc7
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
3 changed files with 7 additions and 3 deletions

View File

@ -88,7 +88,7 @@ my %scrubbertypes = (
},
],
},
opac => {
opac_virtual_card => {
allow => [
qw(
div span h1 h2 h3 h4 h5 h6 p br
@ -108,6 +108,10 @@ my %scrubbertypes = (
class => qr/^[\w\s\-_]+$/,
id => qr/^[\w\-_]+$/,
},
p => {
class => qr/^[\w\s\-_]+$/,
id => qr/^[\w\-_]+$/,
},
'svg' => {
'id' => qr/^[\w\-_]+$/,
'class' => qr/^[\w\s\-_]+$/,

View File

@ -76,7 +76,7 @@ my $content = C4::Letters::GetPreparedLetter(
)
);
my $scrubber = C4::Scrubber->new('opac');
my $scrubber = C4::Scrubber->new('opac_virtual_card');
my $scrubbed = $scrubber->scrub( $content->{content} );
$content->{content} = $scrubbed;

View File

@ -322,7 +322,7 @@ subtest 'record_display profile tests' => sub {
subtest 'opac profile tests' => sub {
plan tests => 20;
my $scrubber = C4::Scrubber->new('opac');
my $scrubber = C4::Scrubber->new('opac_virtual_card');
# Test basic allowed elements
is(