[Koha-patches] [PATCH] bug 3141: use quoted printable encoding in cart/list emails

Galen Charlton galen.charlton at liblime.com
Sun Apr 19 01:25:42 CEST 2009


Ensure that emails sent from lists and the cart in the
OPAC have the correct quoted-printable encoding.  Otherwise,
if there is an equals sign followed by one or two characters
that look like hexadecimal digits in body of the email, the
results can look mangled in some email clients.
---
 opac/opac-sendbasket.pl |    2 +-
 opac/opac-sendshelf.pl  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl
index 5e75dbf..f17bb71 100755
--- a/opac/opac-sendbasket.pl
+++ b/opac/opac-sendbasket.pl
@@ -118,7 +118,7 @@ if ( $email_add ) {
         $email_file = $1;
     }
 
-    if ( $template_res =~ /<MESSAGE>\n(.*)\n<END_MESSAGE>/s ) { $body = $1; }
+    if ( $template_res =~ /<MESSAGE>\n(.*)\n<END_MESSAGE>/s ) { $body = encode_qp($1); }
 
     my $boundary = "====" . time() . "====";
 
diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl
index 340a41c..dc9d2b0 100755
--- a/opac/opac-sendshelf.pl
+++ b/opac/opac-sendshelf.pl
@@ -124,7 +124,7 @@ if ( $email ) {
         $email_file = $1;
     }
 
-    if ( $template_res =~ /<MESSAGE>\n(.*)\n<END_MESSAGE>/s ) { $body = $1; }
+    if ( $template_res =~ /<MESSAGE>\n(.*)\n<END_MESSAGE>/s ) { $body = encode_qp($1); }
 
     my $boundary = "====" . time() . "====";
 
-- 
1.5.6.5




More information about the Koha-patches mailing list