Bugzilla – Attachment 82602 Details for
Bug 18845
Encoding problem with subjects of list and cart emails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18845: Fix encoding of cart and list email subjects
0001-Bug-18845-Fix-encoding-of-cart-and-list-email-subjec.patch (text/plain), 3.19 KB, created by
Katrin Fischer
on 2018-11-23 10:38:53 UTC
(
hide
)
Description:
Bug 18845: Fix encoding of cart and list email subjects
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-11-23 10:38:53 UTC
Size:
3.19 KB
patch
obsolete
>From dc527e527485373c32317462bb463ed4ff5cc3d2 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Fri, 23 Nov 2018 11:30:49 +0100 >Subject: [PATCH] Bug 18845: Fix encoding of cart and list email subjects >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The subject of the cart and list emails is not correctly >encoded and displays incorrectly in some email clients. > >To test: > >Lists: >- Create a list, name it using umlauts or other diacritics > Example: Jugendbücher (books for youths in German) >- Add some items to your list >- Email yourself the list >- Verify that the email subject is broken > >Cart: >- Install another language with non-latin characters like Greek >- Fill the cart with some titles >- Send yourself the cart >- Verify that the email subject is broken > >Note: Some email clients display correctly, others not. > It's known to be incorrect in Outlook and web.de, > displaying nicely in Thunderbird. >--- > basket/sendbasket.pl | 1 + > opac/opac-sendbasket.pl | 1 + > opac/opac-sendshelf.pl | 1 + > virtualshelves/sendshelf.pl | 3 ++- > 4 files changed, 5 insertions(+), 1 deletion(-) > >diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl >index 5bf0f3b37e..aed55b442f 100755 >--- a/basket/sendbasket.pl >+++ b/basket/sendbasket.pl >@@ -112,6 +112,7 @@ if ( $email_add ) { > if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) { > $mail{subject} = $1; > $mail{subject} =~ s|\n?(.*)\n?|$1|; >+ $mail{subject} = encode('MIME-Header',$mail{subject}); > $mail{subject} = Encode::encode("UTF-8", $mail{subject}); > } > else { $mail{'subject'} = "no subject"; } >diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl >index 2afebc7c2b..913d74d9fe 100755 >--- a/opac/opac-sendbasket.pl >+++ b/opac/opac-sendbasket.pl >@@ -133,6 +133,7 @@ if ( $email_add ) { > if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) { > $mail{subject} = $1; > $mail{subject} =~ s|\n?(.*)\n?|$1|; >+ $mail{subject} = encode('MIME-Header',$mail{subject}); > $mail{subject} = Encode::encode("UTF-8", $mail{subject}); > } > else { $mail{'subject'} = "no subject"; } >diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl >index 3a96f8639e..5c76b6d09a 100755 >--- a/opac/opac-sendshelf.pl >+++ b/opac/opac-sendshelf.pl >@@ -136,6 +136,7 @@ if ( $email ) { > $mail{subject} =~ s|\n?(.*)\n?|$1|; > } > else { $mail{'subject'} = "no subject"; } >+ $mail{subject} = encode('MIME-Header',$mail{subject}); > $mail{subject} = Encode::encode("UTF-8", $mail{subject}); > > my $email_header = ""; >diff --git a/virtualshelves/sendshelf.pl b/virtualshelves/sendshelf.pl >index 996c2f71cc..9a1ce7b217 100755 >--- a/virtualshelves/sendshelf.pl >+++ b/virtualshelves/sendshelf.pl >@@ -113,7 +113,8 @@ if ($email) { > > # Analysing information and getting mail properties > if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) { >- $mail{'subject'} = Encode::encode("UTF-8", $1); >+ $mail{'subject'} = encode('MIME-Header',$1); >+ $mail{'subject'} = Encode::encode("UTF-8", $mail{'subject'}); > $mail{subject} =~ s|\n?(.*)\n?|$1|; > } > else { $mail{'subject'} = "no subject"; } >-- >2.11.0 >
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 18845
:
82602