From 57b45c9c675562600de04503761816133f0da1fe Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 20 Mar 2024 08:34:09 +0100 Subject: [PATCH] Bug 36328: Add a separate 'note' profile Signed-off-by: David Cook Signed-off-by: Nick Clemens (cherry picked from commit 7a626d8d870039330889d6e48c3ae5ba848d85e9) Signed-off-by: Fridolin Somers (cherry picked from commit fb1c48da9a06ff30f8aa5bafb1bf1d95cfd58ea2) Signed-off-by: Lucas Gass --- C4/Scrubber.pm | 4 +++- t/Scrubber.t | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Scrubber.pm b/C4/Scrubber.pm index 30a5a83596..e265c8dcc0 100644 --- a/C4/Scrubber.pm +++ b/C4/Scrubber.pm @@ -29,7 +29,8 @@ use C4::Context; my %scrubbertypes = ( default => {}, # place holder, default settings are below as fallbacks in call to constructor tag => {}, # uses defaults - comment => { allow => [qw[ p b i u hr br em big small strong span div ]] }, + comment => { allow => [qw( br b i em big small strong )], }, + note => { allow => [qw[ p b i u hr br em big small strong span div ]] }, staff => { default => [ 1 => { '*' => 1 } ], comment => 1, @@ -49,6 +50,7 @@ sub new { rules => exists $settings->{rules} ? $settings->{rules} : [], default => exists $settings->{default} ? $settings->{default} : [ 0 => { '*' => 0 } ], comment => exists $settings->{comment} ? $settings->{comment} : 0, + note => exists $settings->{note} ? $settings->{note} : 0, process => 0, ); return $scrubber; diff --git a/t/Scrubber.t b/t/Scrubber.t index 1d03ce6762..3a43522ad0 100755 --- a/t/Scrubber.t +++ b/t/Scrubber.t @@ -82,4 +82,4 @@ if ($@) { pass("Test should have failed on entry of 'Client' and it did. YAY!"); } -is( C4::Scrubber->new('comment')->scrub('Allow span'), 'Allow span' ); +is( C4::Scrubber->new('note')->scrub('Allow span'), 'Allow span' ); -- 2.39.5