From e363390bdc832b718c219a18032aed89377d7828 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 12 Jan 2010 06:22:20 -0500
Subject: [PATCH] - Fix problem with '<' and '>' characters in header tests (#1486391)
---
plugins/managesieve/Changelog | 5 ++++-
plugins/managesieve/managesieve.php | 11 +++++++----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog
index 85b3728..81d2879 100644
--- a/plugins/managesieve/Changelog
+++ b/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/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php
index 0655240..677d695 100644
--- a/plugins/managesieve/managesieve.php
+++ b/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 @@
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 @@
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)
--
Gitblit v1.9.1