only allow $foo syntax in embedded quotes, unless escaped with backticks then allow any dollar var

This commit is contained in:
mohrt
2003-02-28 15:54:43 +00:00
parent 620674493a
commit 0a03b8c306

View File

@@ -1448,7 +1448,7 @@ class Smarty_Compiler extends Smarty {
function _expand_quoted_text($var_expr) function _expand_quoted_text($var_expr)
{ {
// if contains unescaped $, expand it // if contains unescaped $, expand it
if(preg_match_all('%(?<!\\\\)\$\`?' . $this->_dvar_guts_regexp . '\`?%', $var_expr, $_match)) { if(preg_match_all('%(?<!\\\\)\$(?:\`' . $this->_dvar_guts_regexp . '\`|\w+)%', $var_expr, $_match)) {
$_match = $_match[0]; $_match = $_match[0];
rsort($_match); rsort($_match);
reset($_match); reset($_match);