Bugzilla – Attachment 20071 Details for
Bug 9372
Automatic carriage return in message_queue where content_type is html
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9372 : Replaces carriage return with <br /> in printed html files for overdues.
Bug-9372--Replaces-carriage-return-with-br--in-pri.patch (text/plain), 2.03 KB, created by
Kyle M Hall (khall)
on 2013-08-02 16:39:18 UTC
(
hide
)
Description:
Bug 9372 : Replaces carriage return with <br /> in printed html files for overdues.
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-08-02 16:39:18 UTC
Size:
2.03 KB
patch
obsolete
>From 65bf24916500a4aca0daed79a492405695b61801 Mon Sep 17 00:00:00 2001 >From: Sophie Meynieux <sophie.meynieux@biblibre.com> >Date: Fri, 2 Aug 2013 15:48:27 +0200 >Subject: [PATCH] Bug 9372 : Replaces 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> >--- > misc/cronjobs/overdue_notices.pl | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 5f285c0..44658f4 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -761,7 +761,10 @@ sub prepare_letter_for_printing { > } > } elsif ( exists $params->{'outputformat'} && $params->{'outputformat'} eq 'html' ) { > $return = "<pre>\n"; >- $return .= "$params->{'letter'}->{'content'}\n"; >+ my $content = $params->{'letter'}->{'content'}; >+ $content=~s/\n/<br \/>/g; >+ $content=~s/\r//g; >+ $return .= "$content\n"; > $return .= "\n</pre>\n"; > } else { > $return .= "$params->{'letter'}->{'content'}\n"; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9372
:
14487
|
14488
|
14546
|
14547
|
14548
|
14549
|
20062
|
20071
|
21003