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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 10 Nov 2023 20:47:06 +0000 (10:47 -1000)
commite0eb511d59093321b7df638a654a93b8010ddb10
tree2f20215b832b58a6c5d76e0c34eff721de1f2d63
parentd60fe27ea4bda16efcd0db096d756e8a54552056
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>
misc/cronjobs/gather_print_notices.pl