Update to Smarty 3.1.15

This commit is contained in:
Némunaire 2013-10-09 19:08:38 +02:00
commit 1c9cd9208f
119 changed files with 5232 additions and 4641 deletions

View file

@ -15,7 +15,7 @@ if (version_compare(PHP_VERSION, '5.2.3', '>=')) {
* special chars except for already escaped ones
*
* @author Monte Ohrt <monte at ohrt dot com>
* @param string $string text that should by escaped
* @param string $string text that should by escaped
* @return string
*/
function smarty_function_escape_special_chars($string)
@ -23,9 +23,10 @@ if (version_compare(PHP_VERSION, '5.2.3', '>=')) {
if (!is_array($string)) {
$string = htmlspecialchars($string, ENT_COMPAT, Smarty::$_CHARSET, false);
}
return $string;
}
} else {
}
} else {
/**
* escape_special_chars common function
*
@ -34,7 +35,7 @@ if (version_compare(PHP_VERSION, '5.2.3', '>=')) {
* special chars except for already escaped ones
*
* @author Monte Ohrt <monte at ohrt dot com>
* @param string $string text that should by escaped
* @param string $string text that should by escaped
* @return string
*/
function smarty_function_escape_special_chars($string)
@ -42,10 +43,9 @@ if (version_compare(PHP_VERSION, '5.2.3', '>=')) {
if (!is_array($string)) {
$string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
$string = htmlspecialchars($string);
$string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
$string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
}
return $string;
}
}
?>
return $string;
}
}