From 261ea440ddf65c9152089faf9f66ca51629e28d0 Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 17 Feb 2011 09:51:26 +0000 Subject: - Use addcslashes() instead of strtr() for string quoting --- program/include/rcube_imap_generic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'program/include/rcube_imap_generic.php') diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index cc590e05a..43b2dff8b 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -3321,7 +3321,7 @@ class rcube_imap_generic else if ($force_quotes || preg_match('/([\x00-\x20\x28-\x29\x7B\x25\x2A\x22\x5B\x5C\x5D\x7F]+)/', $string) ) { - return '"' . strtr($string, array('"'=>'\\"', '\\' => '\\\\')) . '"'; + return '"' . addcslashes($string, '\\"') . '"'; } // atom @@ -3330,7 +3330,7 @@ class rcube_imap_generic static function unEscape($string) { - return strtr($string, array('\\"'=>'"', '\\\\' => '\\')); + return stripslashes($string); } /** -- cgit v1.2.3