aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php')
-rw-r--r--vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php b/vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php
index 6b18d3eec..a204b092c 100644
--- a/vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php
+++ b/vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php
@@ -20,13 +20,7 @@
function smarty_function_escape_special_chars($string)
{
if (!is_array($string)) {
- if (version_compare(PHP_VERSION, '5.2.3', '>=')) {
- $string = htmlspecialchars($string, ENT_COMPAT, Smarty::$_CHARSET, false);
- } else {
- $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
- $string = htmlspecialchars($string);
- $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
- }
+ $string = htmlspecialchars($string, ENT_COMPAT, Smarty::$_CHARSET, false);
}
return $string;
}