Koha-clms/serials
David Cook f055eb5c4e
Bug 41846: Fix nl2br to happen after html escaping
This patch removes the newline to <br/> (nl2br) handling in the .pl script,
and instead moves it after the Template::Toolkit "html" filter. In this way,
we get the security of the "html" filter while also converting new lines into
safe <br/> elements. We also fix a little style problem. Hurray!

Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Ensure the RoutingSerials system preference is enabled
2. Create a "Subscription" for a known biblionumber (e.g. 29) with whatever details
3. On the subscription-detail.pl page for that subscription, click on "Create routing list"
4. Add whatever recipients you want and put the following into Notes:
Testing out notes
1-26-26 more notes
2-5-26 = more notes, 3 copies
<p>Awesome... still safe</p>

5. Click "Save"
6. Observe that your notes are output exactly the same way you put them in. The newlines
appear to be newlines to the human eye, while that pesky <p></p> markup is escaped.
7. Observe that the notes are also neatly lined up with the rest of the routing list
display for an attractive user experience
8. Celebrate again. Hurray!

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 faa94eac6f)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:25 +01:00
..
acqui-search-result.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
acqui-search.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
checkexpiration.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
claims.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
create-numberpattern.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
lateissues-export.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
reorder_members.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
routing-preview.pl Bug 41846: Fix nl2br to happen after html escaping 2026-05-24 13:42:25 +01:00
routing.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
serials-collection.pl Bug 37796: Pass correct publication date when generating the next serial form the serial collection page 2026-01-16 12:59:57 +00:00
serials-edit.pl Bug 36466: (follow-up) Use NULL for blank planned and published dates instead of today 2026-03-23 10:03:40 +00:00
serials-home.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
serials-search.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
showpredictionpattern.pl Bug 37796: (follow-up) Correct call in showpredictionpattern.pl 2026-01-16 12:59:57 +00:00
subscription-add.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-batchedit.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-bib-search.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-detail.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-frequencies.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-frequency.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-history.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-numberpattern.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-numberpatterns.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-renew.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
viewalerts.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00