Bug 40079: Add ul/ol and li to allowed tags in notes profile

This patch add the unordered list, ordered list and list item html tags
to the list of allowed tags in C4::Scrubber.

Test plan:
1) Add a course reserve and include the following in the public note
   field:
   <ul>
     <li>First item</li>
     <li>Second item</li>
   </ul>
2) View the course details page and note "First item Second item" all
   appears on the same line (the ul and li tags have been stripped)
3) View the course reserves page and note the same issue in the public
   notes field of the table display
4) Apply this patch
5) Repeat 2 and 3 and note you now have a bullet pointed list displayed
   in both places
6) The display of the note on the details page may look mis-aligned..
   that will be dealt with on it's own bug

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ddad4e81a2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fb2899f311)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Martin Renvoize 2025-06-05 10:29:41 +01:00 committed by Fridolin Somers
parent ff0a32a714
commit 79a3ff3dec
No known key found for this signature in database
GPG Key ID: 9A8E73E2A8B96537
1 changed files with 1 additions and 2 deletions

View File

@ -29,7 +29,7 @@ use C4::Context;
my %scrubbertypes = (
default => {}, # place holder, default settings are below as fallbacks in call to constructor
comment => { allow => [qw( br b i em big small strong )], },
note => { allow => [qw[ br b i em big small strong u hr span div p ]] },
note => { allow => [qw[ br b i em big small strong u hr span div p ol ul li ]] },
);
@ -45,7 +45,6 @@ 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;