patch for security, php executed in templates

This commit is contained in:
monte.ohrt
2008-09-22 19:26:32 +00:00
parent 2e61902cdf
commit 1fe6ad061c

View File

@@ -1705,6 +1705,8 @@ class Smarty_Compiler extends Smarty {
}
// replace double quoted literal string with single quotes
$_return = preg_replace('~^"([\s\w]+)"$~',"'\\1'",$_return);
// escape dollar sign if not printing a var
$_return = preg_replace('~\$(\W)~',"\\\\\$\\1",$_return);
return $_return;
}