diff --git a/NEWS b/NEWS index eb1c053d..dbc321d4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - recognize $foo[][] syntax inside embedded quotes without + backtics (Monte) - name=123 is passed as an integer (not a string) to plugins now (messju) - $length is now propagated to sub-values in debug_print_var (messju) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index f8c5c9ea..a496297c 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -1452,7 +1452,7 @@ class Smarty_Compiler extends Smarty { function _expand_quoted_text($var_expr) { // if contains unescaped $, expand it - if(preg_match_all('%(?_dvar_guts_regexp . '\`|\w+)%', $var_expr, $_match)) { + if(preg_match_all('%(?_dvar_guts_regexp . '\`|\w+(\[[a-zA-Z0-9]+\])*)%', $var_expr, $_match)) { $_match = $_match[0]; rsort($_match); reset($_match);