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)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 8 Nov 2023 14:41:10 +0000 (11:41 -0300)
commit4c15ad658d59d7f63d27fe61dc102ecd4c22a03d
treee364e023fbfca2674ef052489ad2a44903a5dc12
parent3a027a0da974ecc72d2144f2b503d3013257c8a7
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>
misc/cronjobs/gather_print_notices.pl