projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b587668
)
RT# 79705 Correct UTF-8 output for generated E-Mail
author
Mitch Jackson
<mitch@freeside.biz>
Wed, 23 May 2018 04:44:21 +0000
(23:44 -0500)
committer
Mitch Jackson
<mitch@freeside.biz>
Wed, 23 May 2018 04:44:21 +0000
(23:44 -0500)
FS/FS/Template_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Template_Mixin.pm
b/FS/FS/Template_Mixin.pm
index
c90e652
..
b9514fe
100644
(file)
--- 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;
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 {
} else {
@@
-2290,7
+2289,11
@@
sub generate_email {
'Encoding' => 'quoted-printable',
'Charset' => 'UTF-8',
#'Encoding' => '7bit',
'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',
);
'Disposition' => 'inline',
);
@@
-2369,7
+2372,11
@@
sub generate_email {
' </title>',
' </head>',
' <body bgcolor="#e8e8e8">',
' </title>',
' </head>',
' <body bgcolor="#e8e8e8">',
- Encode::encode_utf8($html),
+ Encode::encode(
+ 'UTF-8',
+ $html,
+ Encode::FB_WARN | Encode::LEAVE_SRC
+ ),
' </body>',
'</html>',
],
' </body>',
'</html>',
],