Bug 34704: Remove regex for adding additional line breaks to print templates
authorKatrin Fischer <katrin.fischer.83@web.de>
Tue, 7 Nov 2023 22:31:31 +0000 (22:31 +0000)
committerPedro Amorim <pedro.amorim@ptfs-europe.com>
Tue, 14 Nov 2023 14:49:43 +0000 (13:49 -0100)
commit1a04d21a71d42d227f05959ed2ea4ecb89243d82
treead89236dff9ba92c68d129e36d097306c0ecedfd
parent50e8b27996eb6308f45cf689b2414bea3f853408
Bug 34704: Remove regex for adding additional line breaks to print templates

This makes sure that we don't change the line breaking for either
HTML nor plain text print notices.
For plain text, the <pre> is used to keep the line breaks as defined
in the notices template.
For HTML we require on the line breaks added by block elements in the
HTML notice, not adding any additional ones like before.
This gives the full control of the formatting to the notice editor.

To test:
* Make sure your patron doesn't have an email address
* Make sure to check the hold filled notice in messaging preferences
* Place a old on any item
* Checkin the item
* Confirm hold
* Verify notices tab shows the Hold (print) notice
* ./misc/cronjobs/gather_print_notices.pl ./ --html
* Verify the generated file has the HTML output wrapped in pre.
* Reformat the HOLD print notice to be HTML by setting the checkbox.
  Mmake sure to add some empty lines for (they should not print later)
  and some <br>, <p>, <div>  - They should be reflected in the notice later.
* Repeat test.
* All should be well :)

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4c15ad658d59d7f63d27fe61dc102ecd4c22a03d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e0eb511d59093321b7df638a654a93b8010ddb10)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
misc/cronjobs/gather_print_notices.pl