fix problem with escaped double quotes

This commit is contained in:
mohrt
2003-03-14 16:28:47 +00:00
parent 8bfba9d22a
commit 05c8d5978f
2 changed files with 3 additions and 2 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- fix problem with escaped double quotes (Monte)
- fix html_radios to not return an array (Monte)
- fixed length in modifier.truncate.php (messju)
- fixed handling of '$'-signs in trimwhitespace outputfilter (messju)

View File

@@ -1459,8 +1459,8 @@ class Smarty_Compiler extends Smarty {
} else {
$_return = $var_expr;
}
// replace double quoted string with single quotes
$_return = preg_replace('!"([^\$\']+)"!',"'\\1'",$_return);
// replace double quoted literal string with single quotes
$_return = preg_replace('!^"([\s\w]+)"$!',"'\\1'",$_return);
return $_return;
}