Bug 9372: replace carriage return with <br /> in printed HTML files for overdues
authorSophie Meynieux <sophie.meynieux@biblibre.com>
Fri, 2 Aug 2013 13:48:27 +0000 (15:48 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 16 Sep 2013 18:37:47 +0000 (18:37 +0000)
commit6dbfe1512dc39e82084f9aa8b8ecce38fa24c5c5
tree43c40da78cd0d43b5a2e87c75b14638c88cf598e
parent1303ad28b2fe5f612a6f65671e4068b67a5de665
Bug 9372: replace carriage return with <br /> in printed HTML files for overdues

For PDF generation, HTML files need explicit <br /> HTML tags. With
this patch, carriage return are replaced by <br /> when letters are
written into HTML files.

Test plan :
- Ensure you've got at least one reader with overdue triggering notice
- Ensure that your notice template got HTML checked
- Run misc/cronjobs/overdue_notices.pl -v -n -html <dirname>
  and misc/cronjobs/printoverdues.sh <dirname>

Without patch, the content of the letter is all on one line in PDF file
With the patch, PDF file is correctly formated

- remove your reader email
- Run misc/cronjobs/overdue_notices.pl -v -html <dirname>
  and misc/cronjobs/printoverdues.sh <dirname>

Without patch, the content of PDF file is all on one line
with the patch, PDF file is correctly formated.

- restore reader email
- run misc/cronjobs/overdue_notice.pl -v -html <dirname>

Verify that the a message has been generated in message_queue table
With or without patch, the message is the same

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
misc/cronjobs/overdue_notices.pl