Don't trim whitespace in folder names (#1488955)

pull/15/head^2
Aleksander Machniak 12 years ago
parent 1961146227
commit 2e33a247fd

@ -1,5 +1,6 @@
- Support tls:// prefix in managesieve_host option - Support tls:// prefix in managesieve_host option
- Removed depracated functions usage - Removed depracated functions usage
- Don't trim whitespace in folder names (#1488955)
* version 6.1 [2012-12-21] * version 6.1 [2012-12-21]
----------------------------------------------------------- -----------------------------------------------------------

@ -835,7 +835,7 @@ class managesieve extends rcube_plugin
case 'fileinto': case 'fileinto':
case 'fileinto_copy': 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'); $this->form['actions'][$i]['target'] = $this->mod_mailbox($mailbox, 'in');
if ($type == 'fileinto_copy') { if ($type == 'fileinto_copy') {
$type = 'fileinto'; $type = 'fileinto';
@ -1708,16 +1708,16 @@ class managesieve extends rcube_plugin
private function genid() private function genid()
{ {
$result = preg_replace('/[^0-9]/', '', microtime(true)); return preg_replace('/[^0-9]/', '', microtime(true));
return $result;
} }
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); $str = strip_tags($str);
}
return trim($str); return $trim ? trim($str) : $str;
} }
private function error_class($id, $type, $target, $elem_prefix='') private function error_class($id, $type, $target, $elem_prefix='')

Loading…
Cancel
Save