diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e36c221..f02f3d32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased ### Changed - Update htmlpurifier library to 4.17.0 +- Avoid usage of deprecated utf8_encode function in viewpart ## 1.2.23 ### Added diff --git a/mailscanner/viewpart.php b/mailscanner/viewpart.php index 2f11ac87..43cbdf24 100644 --- a/mailscanner/viewpart.php +++ b/mailscanner/viewpart.php @@ -139,7 +139,7 @@ function decode_structure($structure) if ('windows-1255' == strtolower($structure->ctype_parameters['charset'])) { $structure->body = iconv('ISO-8859-8', 'UTF-8', $structure->body); } elseif ('utf-8' !== strtolower($structure->ctype_parameters['charset'])) { - $structure->body = utf8_encode($structure->body); + $structure->body = getUTF8String($structure->body); } } echo ' @@ -159,7 +159,7 @@ function decode_structure($structure) if ('windows-1255' == strtolower($structure->ctype_parameters['charset'])) { $structure->body = iconv('ISO-8859-8', 'UTF-8', $structure->body); } elseif ('utf-8' !== strtolower($structure->ctype_parameters['charset'])) { - $structure->body = utf8_encode($structure->body); + $structure->body = getUTF8String($structure->body); } } if (STRIP_HTML) {