From ee393929a6c4ed165b47a0ae5ae0e87b6da999fb Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sun, 17 Feb 2013 04:37:16 -0500 Subject: [PATCH] Don't trim whitespace in folder names (#1488955) --- plugins/managesieve/Changelog | 2 ++ plugins/managesieve/managesieve.php | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index 19799a3..c0b46e0 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,4 +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 d30404a..877f6ba 100644 --- a/plugins/managesieve/managesieve.php +++ b/plugins/managesieve/managesieve.php @@ -835,7 +835,7 @@ 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 @@ 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='') -- Gitblit v1.9.1