mirror of
https://github.com/smarty-php/smarty.git
synced 2025-12-03 15:59:32 +01:00
- fixed variables in 'file' attribute of {extend} tag
- fixed problems in modifiers (if mb string functions not present)
This commit is contained in:
@@ -34,7 +34,7 @@ function smarty_modifier_regex_replace($string, $search, $replace)
|
||||
if ($smarty->has_mb) {
|
||||
return mb_ereg_replace($search, $replace, $string);
|
||||
} else {
|
||||
return ereg_replace($search, $replace, $string);
|
||||
return preg_replace($search, $replace, $string);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ function _smarty_regex_replace_check($search)
|
||||
$search = substr($search, 0, $pos);
|
||||
if (mb_preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
|
||||
/* remove eval-modifier from $search */
|
||||
$search = substr($search, 0, - strlen($match[1])) . ereg_replace('![e\s]+!', '', $match[1]);
|
||||
$search = substr($search, 0, - strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
|
||||
}
|
||||
}
|
||||
return $search;
|
||||
|
||||
Reference in New Issue
Block a user