[ingo] commas in Sieve_Test_Header
Todd Merritt
tmerritt at email.arizona.edu
Tue Jun 24 13:55:48 PDT 2003
The check for ,'s in the value field in Sieve_Test_Header doesn't check
for escaped ,'s. The following patch fixes that, although I haven't
actually tested it as is.
Todd
--- sieve.php.orig 2003-06-19 13:57:46.000000000 -0700
+++ sieve.php 2003-06-24 13:54:05.000000000 -0700
@@ -1154,7 +1154,7 @@
return false;
}
- $strings = preg_split('(\r\n|\n|\r|,)',
$this->_vars['strings']);
+ $strings = preg_split("/((?<!\\\)\,|\r\n|\n|\r)/",
$this->_vars['strings']);
if (count($strings) < 1) {
return false;
}
@@ -1186,7 +1186,7 @@
return _("No Headers Specified");
}
- $strings = preg_split('(\r\n|\n|\r|,)',
$this->_vars['strings']);
+ $strings = preg_split("/((?<!\\\)\,\s*|\r\n|\n|\r)/",
$this->_vars['strings']);
if (count($strings) > 1) {
$code .= "[";
$stringlist = '';
More information about the ingo
mailing list