diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-02-17 10:32:38 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-02-17 10:32:38 +0100 |
commit | 2e33a247fdf08dca4dabbda11895d0e9e2f4adcd (patch) | |
tree | c1a3ad1bdae8e71326dc87050525a8c0c1f3bd36 /plugins | |
parent | 19611462279252582e8c5b384c13f89949e229e5 (diff) |
Don't trim whitespace in folder names (#1488955)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/managesieve/Changelog | 1 | ||||
-rw-r--r-- | plugins/managesieve/managesieve.php | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index d8baf63ef..c0b46e070 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,5 +1,6 @@ - Support tls:// prefix in managesieve_host option - Removed depracated functions usage +- Don't trim whitespace in folder names (#1488955) * version 6.1 [2012-12-21] ----------------------------------------------------------- diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php index 8f50cd5a2..da682595f 100644 --- a/plugins/managesieve/managesieve.php +++ b/plugins/managesieve/managesieve.php @@ -835,7 +835,7 @@ class managesieve extends rcube_plugin case 'fileinto': case 'fileinto_copy': - $mailbox = $this->strip_value($mailboxes[$idx]); + $mailbox = $this->strip_value($mailboxes[$idx], false, false); $this->form['actions'][$i]['target'] = $this->mod_mailbox($mailbox, 'in'); if ($type == 'fileinto_copy') { $type = 'fileinto'; @@ -1708,16 +1708,16 @@ class managesieve extends rcube_plugin private function genid() { - $result = preg_replace('/[^0-9]/', '', microtime(true)); - return $result; + return preg_replace('/[^0-9]/', '', microtime(true)); } - private function strip_value($str, $allow_html=false) + private function strip_value($str, $allow_html = false, $trim = true) { - if (!$allow_html) + if (!$allow_html) { $str = strip_tags($str); + } - return trim($str); + return $trim ? trim($str) : $str; } private function error_class($id, $type, $target, $elem_prefix='') |