summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-01-12 11:22:20 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-01-12 11:22:20 +0000
commit4465a4c53a618fc88fba43fc2d119e9fc3a4369f (patch)
tree3f1c540ff850d5813735b071d2748c2e37e25c5a
parentdfc926fbcc750eae40f6154e981629e538920ada (diff)
- Fix problem with '<' and '>' characters in header tests (#1486391)
git-svn-id: https://svn.roundcube.net/trunk@3199 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/plugins/managesieve/Changelog5
-rw-r--r--roundcubemail/plugins/managesieve/managesieve.php11
2 files changed, 11 insertions, 5 deletions
diff --git a/roundcubemail/plugins/managesieve/Changelog b/roundcubemail/plugins/managesieve/Changelog
index 85b3728e8..81d2879c9 100644
--- a/roundcubemail/plugins/managesieve/Changelog
+++ b/roundcubemail/plugins/managesieve/Changelog
@@ -1,4 +1,7 @@
-- Fix requires generation when many modules are used
+* version 2.1 [2010-01-12]
+-----------------------------------------------------------
+- Fix "require" structure generation when many modules are used
+- Fix problem with '<' and '>' characters in header tests
* version 2.0 [2009-11-02]
-----------------------------------------------------------
diff --git a/roundcubemail/plugins/managesieve/managesieve.php b/roundcubemail/plugins/managesieve/managesieve.php
index 065524032..677d6951e 100644
--- a/roundcubemail/plugins/managesieve/managesieve.php
+++ b/roundcubemail/plugins/managesieve/managesieve.php
@@ -7,7 +7,7 @@
* It's clickable interface which operates on text scripts and communicates
* with server using managesieve protocol. Adds Filters tab in Settings.
*
- * @version 2.0
+ * @version 2.1
* @author Aleksander 'A.L.E.C' Machniak <alec@alec.pl>
*
* Configuration (see config.inc.php.dist):
@@ -323,7 +323,7 @@ class managesieve extends rcube_plugin
else foreach($headers as $idx => $header)
{
$header = $this->strip_value($header);
- $target = $this->strip_value($targets[$idx]);
+ $target = $this->strip_value($targets[$idx], true);
$op = $this->strip_value($ops[$idx]);
// normal header
@@ -962,9 +962,12 @@ class managesieve extends rcube_plugin
return $result;
}
- private function strip_value($str)
+ private function strip_value($str, $allow_html=false)
{
- return trim(strip_tags($str));
+ if (!$allow_html)
+ $str = strip_tags($str);
+
+ return trim($str);
}
private function error_class($id, $type, $target, $name_only=false)