mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
elements inside `` are bracketed now inside the compiled-tpl. this
fixes some issues with simple-math inside backticks.
This commit is contained in:
@@ -1565,7 +1565,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
rsort($_match);
|
rsort($_match);
|
||||||
reset($_match);
|
reset($_match);
|
||||||
foreach($_match as $_var) {
|
foreach($_match as $_var) {
|
||||||
$var_expr = str_replace ($_var, '".' . $this->_parse_var(str_replace('`','',$_var)) . '."', $var_expr);
|
$var_expr = str_replace ($_var, '".(' . $this->_parse_var(str_replace('`','',$_var)) . ')."', $var_expr);
|
||||||
}
|
}
|
||||||
$_return = preg_replace('%\.""|(?<!\\\\)""\.%', '', $var_expr);
|
$_return = preg_replace('%\.""|(?<!\\\\)""\.%', '', $var_expr);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user