From 05c8d5978f64b620d2e77894d2109a7a5b11b8f4 Mon Sep 17 00:00:00 2001 From: mohrt Date: Fri, 14 Mar 2003 16:28:47 +0000 Subject: [PATCH] fix problem with escaped double quotes --- NEWS | 1 + libs/Smarty_Compiler.class.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index b4b06584..7399c5a5 100644 --- a/NEWS +++ b/NEWS @@ -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) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index d50024c3..f126c6ae 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -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; }