diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-17 09:45:34 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-17 09:45:34 +0000 |
| commit | d10c9afbac01945303d4140868a3f0c8f31c6447 (patch) | |
| tree | 936ac9ec67fd4259c043ab383848fe69aeeee225 /plugins | |
| parent | 8a5d9d1e6ff8fd5b30c5ea024aa0311aab70a6bb (diff) | |
- Use addcslashes() instead of str_replace() for string quoting
git-svn-id: https://svn.roundcube.net/trunk@4558 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/managesieve/lib/rcube_sieve_script.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/managesieve/lib/rcube_sieve_script.php b/plugins/managesieve/lib/rcube_sieve_script.php index 6aa4f5542..084540b60 100644 --- a/plugins/managesieve/lib/rcube_sieve_script.php +++ b/plugins/managesieve/lib/rcube_sieve_script.php @@ -554,9 +554,7 @@ class rcube_sieve_script } // quoted-string else { - $replace = array('\\' => '\\\\', '"' => '\\"'); - $str = str_replace(array_keys($replace), array_values($replace), $str); - return '"' . $str . '"'; + return '"' . addcslashes($str, '\\"') . '"'; } } |
