mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-04 13:18:00 +02:00
Do checks against iconvAvailable because PHP 5.4 has botched iconv support.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
@@ -355,7 +355,12 @@ class HTMLPurifier_Encoder
|
||||
$str = utf8_encode($str);
|
||||
return $str;
|
||||
}
|
||||
trigger_error('Encoding not supported, please install iconv', E_USER_ERROR);
|
||||
$bug = HTMLPurifier_Encoder::testIconvTruncateBug();
|
||||
if ($bug == self::ICONV_OK) {
|
||||
trigger_error('Encoding not supported, please install iconv', E_USER_ERROR);
|
||||
} else {
|
||||
trigger_error('You have a buggy version of iconv, see https://bugs.php.net/bug.php?id=48147 and http://sourceware.org/bugzilla/show_bug.cgi?id=13541', E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user