summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-02-17 09:51:26 +0000
committeralecpl <alec@alec.pl>2011-02-17 09:51:26 +0000
commit261ea440ddf65c9152089faf9f66ca51629e28d0 (patch)
treef19b504e6c13f9b653fd8ffe4018b0d7ea70a1d8 /program
parentc5dedd79caa2b083b264ce0af16cd54e968b817c (diff)
- Use addcslashes() instead of strtr() for string quoting
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap_generic.php4
1 files changed, 2 insertions, 2 deletions
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);
}
/**