projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
95b5826
)
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, 18 Jul 2018 22:04:09 +0000
(22:04 +0000)
FS/FS/Template_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Template_Mixin.pm
b/FS/FS/Template_Mixin.pm
index
4d1079a
..
38c5066
100644
(file)
--- a/
FS/FS/Template_Mixin.pm
+++ b/
FS/FS/Template_Mixin.pm
@@
-2274,8
+2274,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 {
@@
-2291,7
+2290,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',
);
@@
-2370,7
+2373,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>',
],