[freeside-commits] branch master updated. 9b69e985d204fea71a283d32ca607c9b4be2f1c5

Mitch Jackson mitch at freeside.biz
Tue May 22 21:44:41 PDT 2018


The branch, master has been updated
       via  9b69e985d204fea71a283d32ca607c9b4be2f1c5 (commit)
      from  b5876680bf13c72fc9ba00e0ad3b87967b69005c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9b69e985d204fea71a283d32ca607c9b4be2f1c5
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Tue May 22 23:44:21 2018 -0500

    RT# 79705 Correct UTF-8 output for generated E-Mail

diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index c90e65245..b9514fee1 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -2273,8 +2273,7 @@ sub generate_email {
       warn "$me generating plain text invoice"
         if $DEBUG;
 
-      # 'print_text' argument is no longer used
-      @text = map Encode::encode_utf8($_), $self->print_text(\%args);
+      @text = $self->print_text(\%args);
 
     } else {
 
@@ -2290,7 +2289,11 @@ sub generate_email {
     'Encoding'    => 'quoted-printable',
     'Charset'     => 'UTF-8',
     #'Encoding'    => '7bit',
-    'Data'        => \@text,
+    'Data'        => [
+      map
+        { Encode::encode('UTF-8', $_, Encode::FB_WARN | Encode::LEAVE_SRC ) }
+        @text
+    ],
     'Disposition' => 'inline',
   );
 
@@ -2369,7 +2372,11 @@ sub generate_email {
                          '    </title>',
                          '  </head>',
                          '  <body bgcolor="#e8e8e8">',
-                         Encode::encode_utf8($html),
+                         Encode::encode(
+                           'UTF-8',
+                           $html,
+                           Encode::FB_WARN | Encode::LEAVE_SRC
+                         ),
                          '  </body>',
                          '</html>',
                        ],

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Template_Mixin.pm | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list