From 1f2080e22c6e2fb1bd2dd75af7d74b33308a9f76 Mon Sep 17 00:00:00 2001 From: Alexandros Sigalas Date: Mon, 1 Apr 2019 12:24:45 +0300 Subject: [PATCH] Convert first with Api\Translation::convert, then decode with html_entity_decode() --- api/src/Mail/Html.php | 1 + 1 file changed, 1 insertion(+) diff --git a/api/src/Mail/Html.php b/api/src/Mail/Html.php index 73edfdf0bd4..5710b323b5d 100644 --- a/api/src/Mail/Html.php +++ b/api/src/Mail/Html.php @@ -404,6 +404,7 @@ static function convertHTMLToText($_html,$displayCharset=false,$stripcrl=false,$ $_html = str_replace('#greater#than#','>',$_html); //error_log(__METHOD__.__LINE__.' Charset:'.$displayCharset.' -> '.$_html); $_html = Api\Translation::convert($_html, $displayCharset, 'utf-8'); + $_html = html_entity_decode($_html, ENT_COMPAT, 'utf-8'); //error_log(__METHOD__.__LINE__.' Charset:'.$displayCharset.' After html_entity_decode: -> '.$_html); //self::replaceEmailAdresses($_html); $pos = strpos($_html, 'blockquote');