Bugzilla – Attachment 113243 Details for
Bug 26948
Some Koha Emails are double encoded (HOLD, ODUE, ...)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22343: Remove double encoding from sent emails
Bug-22343-Remove-double-encoding-from-sent-emails.patch (text/plain), 1.75 KB, created by
Joonas Kylmälä
on 2020-11-06 12:10:27 UTC
(
hide
)
Description:
Bug 22343: Remove double encoding from sent emails
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2020-11-06 12:10:27 UTC
Size:
1.75 KB
patch
obsolete
>From 957a2a863802516f0de5bdc07d17fcfcfe6f0bea Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Fri, 6 Nov 2020 13:35:39 +0200 >Subject: [PATCH] Bug 22343: Remove double encoding from sent emails >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The sent emails from Koha were garbled / double encoded because >Koha::Email now after the refactoring and moving to use Email::Stuffer >handles the encoding itself. Previously the Koha::Email callee had to >handle the encoding. This patch removes the double encoding in the >email subject and content. > >To test: > 1) Put some UTF-8 characters like ä in the HOLD template subject and body > 2) Create hold and check-in an item to make it Waiting and cause the > email to be send > 3) Notice the email comes garbled / double encoded > 4) Apply patch > 5) Repeat step 2) and notice the email comes without any issues in > encoding and look OK. > 6) Make sure "prove t/Koha/Email.t" and "prove > t/db_dependent/Letters.t" and passes > >https://bugs.koha-community.org/show_bug.cgi?id=26948 >--- > C4/Letters.pm | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index cd0c651f03..2470073eb8 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -1314,11 +1314,9 @@ sub _send_message_by_email { > } > } > >- # Encode subject line separately >- $message->{subject} = encode('MIME-Header', $message->{'subject'} ); > my $subject = $message->{'subject'}; > >- my $content = encode('UTF-8', $message->{'content'}); >+ my $content = $message->{'content'}; > my $content_type = $message->{'content_type'} || 'text/plain; charset="UTF-8"'; > my $is_html = $content_type =~ m/html/io; > >-- >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 26948
:
113242
|
113243
|
113244
|
113245
|
113545
|
113553
|
113555
|
113558
|
113559
|
113560
|
113561