mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 05:41:37 +01:00
recognize $foo[][] syntax in embedded quotes without backticks
This commit is contained in:
@@ -1452,7 +1452,7 @@ class Smarty_Compiler extends Smarty {
|
||||
function _expand_quoted_text($var_expr)
|
||||
{
|
||||
// if contains unescaped $, expand it
|
||||
if(preg_match_all('%(?<!\\\\)\$(?:\`' . $this->_dvar_guts_regexp . '\`|\w+)%', $var_expr, $_match)) {
|
||||
if(preg_match_all('%(?<!\\\\)\$(?:\`' . $this->_dvar_guts_regexp . '\`|\w+(\[[a-zA-Z0-9]+\])*)%', $var_expr, $_match)) {
|
||||
$_match = $_match[0];
|
||||
rsort($_match);
|
||||
reset($_match);
|
||||
|
||||
Reference in New Issue
Block a user