Bugzilla – Attachment 14547 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]
[SIGNED-OFF] Bug 9372 : replace \n with <br /> for html messages in message_queue
Bug-9372--replace-n-with-br--for-html-messages-in-.patch (text/plain), 1.35 KB, created by
Kyle M Hall
on 2013-01-11 19:50:28 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9372 : replace \n with <br /> for html messages in message_queue
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2013-01-11 19:50:28 UTC
Size:
1.35 KB
patch
obsolete
>From 6be9524c2d5db79a64bb6c5c7b3d27e90913b64b Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?St=C3=A9phane=20Delaune?= <stephane.delaune@biblibre.com> >Date: Wed, 9 Jan 2013 12:35:34 +0100 >Subject: [PATCH] Bug 9372 : replace \n with <br /> for html messages in message_queue > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Letters.pm | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 36e6213..4f4acd9 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -698,7 +698,11 @@ sub EnqueueLetter { > } > ); > } >- >+ if( $params->{'letter'}->{'content-type'} and ($params->{'letter'}->{'content-type'}=~/html/i )) >+ { >+ $content=~s/\n/<br \/>/g; >+ $content=~s/\r//g; >+ } > my $dbh = C4::Context->dbh(); > my $statement = << 'ENDSQL'; > INSERT INTO message_queue >@@ -711,7 +715,7 @@ ENDSQL > my $result = $sth->execute( > $params->{'borrowernumber'}, # borrowernumber > $params->{'letter'}->{'title'}, # subject >- $params->{'letter'}->{'content'}, # content >+ $content, # content > $params->{'letter'}->{'metadata'} || '', # metadata > $params->{'letter'}->{'code'} || '', # letter_code > $params->{'message_transport_type'}, # message_transport_type >-- >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