Bugzilla – Attachment 14487 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]
proposed patch
0001-Bug-9372-replace-n-with-br-for-html-messages-in-mess.patch (text/plain), 1.30 KB, created by
Stéphane Delaune
on 2013-01-09 12:16:22 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Stéphane Delaune
Created:
2013-01-09 12:16:22 UTC
Size:
1.30 KB
patch
obsolete
>From 1612cda53b1e944b52f4fb53ec1276ae88294018 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 > >--- > C4/Letters.pm | 8 ++++++-- > 1 file 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.9.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