From a3f46063af231d1e528bc389e3ef92f782452692 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Tue, 14 Aug 2012 08:02:59 +0200 Subject: [PATCH] Bug 8626: Fix encoding in cart emails for use of quoted-printable Content-Type: text/plain; charset="UTF-8" When using quoted-printable data needs to be encoded accordingly. Content-Transfer-Encoding: quoted-printable Without the patch = in URLs or data will be interpreted as the beginning of a special character resulting in broken URLs. To test: - Check diacritics in records display correctly - Check various URLs with = to make sure they all work correctly Signed-off-by: Jared Camins-Esakov This is only a partial fix, as the subject line is not encoded, but it is a huge improvement over what it was before. --- opac/opac-sendbasket.pl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index 5b38a54..da74745 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -134,7 +134,7 @@ if ( $email_add ) { my $email_header = ""; if ( $template_res =~ /
\n(.*)\n?/s ) { - $email_header = $1; + $email_header = encode_qp($1); } my $email_file = "basket.txt"; @@ -143,7 +143,7 @@ if ( $email_add ) { } if ( $template_res =~ /\n(.*)\n?/s ) { - $body = $1; + $body = encode_qp($1); } my $boundary = "====" . time() . "===="; -- 1.7.2.5