Commit 6ad50e80 authored by sunnavy's avatar sunnavy
Browse files

fix the encoding bug of text/html template

parent a17642ae
......@@ -442,8 +442,10 @@ sub _DowngradeFromHTML {
require HTML::FormatText;
require HTML::TreeBuilder;
require Encode;
# need to decode_utf8, see the doc of MIMEObj method
my $tree = HTML::TreeBuilder->new_from_content(
$new_entity->bodyhandle->as_string
Encode::decode_utf8($new_entity->bodyhandle->as_string)
);
$new_entity->bodyhandle(MIME::Body::InCore->new(
\(scalar HTML::FormatText->new(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment