|
@@ -201,11 +201,15 @@ class Zend_Filter_HtmlEntities implements Zend_Filter_Interface
|
|
|
if (strlen((string) $value) && !strlen($filtered)) {
|
|
if (strlen((string) $value) && !strlen($filtered)) {
|
|
|
if (!function_exists('iconv')) {
|
|
if (!function_exists('iconv')) {
|
|
|
require_once 'Zend/Filter/Exception.php';
|
|
require_once 'Zend/Filter/Exception.php';
|
|
|
- throw new Zend_Filter_Exception(sprintf('Encoding mismatch has resulted in htmlentities errors'));
|
|
|
|
|
|
|
+ throw new Zend_Filter_Exception('Encoding mismatch has resulted in htmlentities errors');
|
|
|
}
|
|
}
|
|
|
$enc = $this->getEncoding();
|
|
$enc = $this->getEncoding();
|
|
|
$value = iconv('', $enc . '//IGNORE', (string) $value);
|
|
$value = iconv('', $enc . '//IGNORE', (string) $value);
|
|
|
$filtered = htmlentities($value, $this->getQuoteStyle(), $enc, $this->getDoubleQuote());
|
|
$filtered = htmlentities($value, $this->getQuoteStyle(), $enc, $this->getDoubleQuote());
|
|
|
|
|
+ if (!strlen($filtered)) {
|
|
|
|
|
+ require_once 'Zend/Filter/Exception.php';
|
|
|
|
|
+ throw new Zend_Filter_Exception('Encoding mismatch has resulted in htmlentities errors');
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return $filtered;
|
|
return $filtered;
|
|
|
}
|
|
}
|