Skip to content

Commit

Permalink
Avoid usage of deprecated utf8_encode function in viewpart
Browse files Browse the repository at this point in the history
  • Loading branch information
endelwar committed May 24, 2024
1 parent 07c7fc7 commit 5e41f3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mailscanner/viewpart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<!DOCTYPE html>
Expand All @@ -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) {
Expand Down

0 comments on commit 5e41f3a

Please sign in to comment.