update embedded variable logic, get rid of ."" at end of output

This commit is contained in:
mohrt
2002-12-13 15:58:45 +00:00
parent 1f12a0f3e0
commit dccaba62ca
2 changed files with 2 additions and 2 deletions

View File

@@ -1093,7 +1093,7 @@ class Smarty_Compiler extends Smarty {
foreach($match[0] as $var) {
$var_expr = str_replace ($var, '".' . $this->_parse_var($var) . '."', $var_expr);
}
$tokens[$expr_index] = preg_replace(array('!^""\.!','!\.""\.!'), array('','.'), $var_expr);
$tokens[$expr_index] = preg_replace(array('!(^""\.)|(\.""$)!','!\.""\.!'), array('','.'), $var_expr);
}
}
}

View File

@@ -1093,7 +1093,7 @@ class Smarty_Compiler extends Smarty {
foreach($match[0] as $var) {
$var_expr = str_replace ($var, '".' . $this->_parse_var($var) . '."', $var_expr);
}
$tokens[$expr_index] = preg_replace(array('!^""\.!','!\.""\.!'), array('','.'), $var_expr);
$tokens[$expr_index] = preg_replace(array('!(^""\.)|(\.""$)!','!\.""\.!'), array('','.'), $var_expr);
}
}
}