diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index cebd71b4a..403ce05fd 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -581,8 +581,7 @@ function sqimap_mailbox_list($imap_stream) { $used[$k] = true; } $spec_sub = str_replace(' ', '', $box['formatted']); - $spec_sub = str_replace('*', '', $spec_sub); - $spec_sub = str_replace('?', '\?', $spec_sub); + $spec_sub = preg_replace("/(\*|\[|\]|\(|\)|\?|\+|\{|\}|\^|\\$)/", '\\\\'.'\\1', $spec_sub); /* In case of problems with preg here is a ereg version