Bugzilla – Attachment 22631 Details for
Bug 11173
Carriage returns are missing in email notification when content type is html
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11173 : Notifications by email lacks carriage returns if content type is HTML
Bug-11173--Notifications-by-email-lacks-carriage-r.patch (text/plain), 1.48 KB, created by
Marcel de Rooy
on 2013-10-31 11:51:32 UTC
(
hide
)
Description:
Bug 11173 : Notifications by email lacks carriage returns if content type is HTML
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-10-31 11:51:32 UTC
Size:
1.48 KB
patch
obsolete
>From d90cf50fd5b82043d2b7bfdaa23edb33ee235dbc Mon Sep 17 00:00:00 2001 >From: Sophie Meynieux <sophie.meynieux@biblibre.com> >Date: Wed, 30 Oct 2013 17:48:31 +0100 >Subject: [PATCH] Bug 11173 : Notifications by email lacks carriage returns if > content type is HTML >Content-Type: text/plain; charset=utf-8 > >Test plan : >- Define one letter template for overdues for example >- Check "HTML Message" >- Define some overdue rules that are using this letter >- Find one borrower that has overdues triggering this notification. >- Run misc/cronjobs/overdue_notices.pl to generate the message and change to_address to give your email > >Without patch : >- run misc/cronjobs/process_messsage_queue.pl => email content is all on one line > >With the patch : >- change message status to 'pending' so that it could be sent once again >- run misc/cronjobs/process_message_queue.pl => email content is displaid correctly with carriage returns as defined in template > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Letters.pm | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 7125148..3d9e9cb 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -977,6 +977,9 @@ sub _send_message_by_email { > sub _wrap_html { > my ($content, $title) = @_; > >+ $content=~s/\n/<br \/>/g; >+ $content=~s/\r//g; >+ > my $css = C4::Context->preference("NoticeCSS") || ''; > $css = qq{<link rel="stylesheet" type="text/css" href="$css">} if $css; > return <<EOS; >-- >1.7.7.6
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 11173
:
22611
| 22631