aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 18:29:06 +0000
committerMario <mario@mariovavti.com>2022-10-11 18:29:06 +0000
commitccd826f63a7a4c7e442fab8a70d9c4c84808b417 (patch)
treefbbde69114acba764cf6b735433c53e099fd19c5 /vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php
parent5e5f0aa955d86743a14531bed98501b59140ab1f (diff)
downloadvolse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.tar.gz
volse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.tar.bz2
volse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.zip
Revert "update composer libs"
This reverts commit 5e5f0aa955d86743a14531bed98501b59140ab1f.
Diffstat (limited to 'vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php')
-rw-r--r--vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php
index d4791cc1b..40a24266a 100644
--- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php
+++ b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php
@@ -398,8 +398,8 @@ class HTMLPurifier_Encoder
// characters to their true byte-wise ASCII/UTF-8 equivalents.
$str = strtr($str, self::testEncodingSupportsASCII($encoding));
return $str;
- } elseif ($encoding === 'iso-8859-1' && function_exists('mb_convert_encoding')) {
- $str = mb_convert_encoding($str, 'UTF-8', 'ISO-8859-1');
+ } elseif ($encoding === 'iso-8859-1') {
+ $str = utf8_encode($str);
return $str;
}
$bug = HTMLPurifier_Encoder::testIconvTruncateBug();
@@ -450,8 +450,8 @@ class HTMLPurifier_Encoder
// Normal stuff
$str = self::iconv('utf-8', $encoding . '//IGNORE', $str);
return $str;
- } elseif ($encoding === 'iso-8859-1' && function_exists('mb_convert_encoding')) {
- $str = mb_convert_encoding($str, 'ISO-8859-1', 'UTF-8');
+ } elseif ($encoding === 'iso-8859-1') {
+ $str = utf8_decode($str);
return $str;
}
trigger_error('Encoding not supported', E_USER_ERROR);