diff options
author | alecpl <alec@alec.pl> | 2011-02-09 12:01:29 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-02-09 12:01:29 +0000 |
commit | 075ee62a7723c76df3eb7e6e2d5884a266f951b8 (patch) | |
tree | 1825e7fbcb8cb70694ef882a84b28a8a7f7b0dc6 /program/include/rcube_imap_generic.php | |
parent | a97937aceb6c84e4c91b04eea35eba162f453c7e (diff) |
- Add workaround for DBMail's bug http://www.dbmail.org/mantis/view.php?id=881 (#1487766)
Diffstat (limited to 'program/include/rcube_imap_generic.php')
-rw-r--r-- | program/include/rcube_imap_generic.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index dace4efd2..e7a9cedf3 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -3313,10 +3313,11 @@ class rcube_imap_generic else if ($string === '') { return '""'; } + // need quoted-string? find special chars: SP, CTL, (, ), {, %, *, ", \, ] + // plus [ character as a workaround for DBMail's bug (#1487766) else if ($force_quotes || - preg_match('/([\x00-\x20\x28-\x29\x7B\x25\x2A\x22\x5C\x5D\x7F]+)/', $string) + preg_match('/([\x00-\x20\x28-\x29\x7B\x25\x2A\x22\x5B\x5C\x5D\x7F]+)/', $string) ) { - // string: special chars: SP, CTL, (, ), {, %, *, ", \, ] return '"' . strtr($string, array('"'=>'\\"', '\\' => '\\\\')) . '"'; } |