mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 12:14:12 +02:00
- changed internals to use Smarty::$_MBSTRING ($_CHARSET, $_DATE_FORMAT) for better unit testing
This commit is contained in:
@@ -23,7 +23,7 @@ function smarty_modifiercompiler_unescape($params, $compiler)
|
||||
$params[1] = 'html';
|
||||
}
|
||||
if (!isset($params[2])) {
|
||||
$params[2] = "SMARTY_RESOURCE_CHAR_SET";
|
||||
$params[2] = '\'' . addslashes(Smarty::$_CHARSET) . '\'';
|
||||
} else {
|
||||
$params[2] = "'" . $params[2] . "'";
|
||||
}
|
||||
@@ -32,7 +32,7 @@ function smarty_modifiercompiler_unescape($params, $compiler)
|
||||
case 'entity':
|
||||
return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')';
|
||||
case 'htmlall':
|
||||
if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
|
||||
if (Smarty::$_MBSTRING) {
|
||||
return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')';
|
||||
}
|
||||
return 'html_entity_decode(' . $params[0] . ', ENT_QUOTES, ' . $params[2] . ')';
|
||||
|
||||
Reference in New Issue
Block a user