From 5e41f3a0747d2fb9ffa8f86415a77d6201a35a00 Mon Sep 17 00:00:00 2001 From: Manuel Dalla Lana Date: Fri, 24 May 2024 17:15:02 +0200 Subject: [PATCH] Avoid usage of deprecated utf8_encode function in viewpart --- CHANGELOG.md | 1 + mailscanner/viewpart.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e36c221d..f02f3d326 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 2f11ac874..43cbdf248 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) {