summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--fckeditor.module8
2 files changed, 5 insertions, 4 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 3feca4b..7a1d37b 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -7,6 +7,7 @@ $Id$
* #371653 Removed t() from schema description
* #369093 Fixed: AJAX callback - XSS filter should not be called if no security filter is selected
* #374101 Fixed: FCKeditor settings - error highlights wrong field
+* #345166 Corrected validation of fields to exclude/include with double dash
-- 2009-01-28 version 6.x-1.x-dev
* #363594 Fixed: invalid text on toggle link
diff --git a/fckeditor.module b/fckeditor.module
index 2b559fb..0946a7f 100644
--- a/fckeditor.module
+++ b/fckeditor.module
@@ -427,7 +427,7 @@ function fckeditor_profile_validate($edit) {
//validate fields
$fields = preg_split("/[\s,]+/", strip_tags($edit['excl_fields']));
foreach ($fields as $field) {
- if ($field && !preg_match("/^[a-z]+(\-[[:alnum:]]+|\\*|\-\\*)+$/i", $field)) {
+ if ($field && !preg_match("/^[a-z]+(\-{1,2}[[:alnum:]]+|\\*|\-\\*)+$/i", $field)) {
$errors['excl_fields'] = t("Invalid field specified: %1", array("%1" => $field));
break;
}
@@ -435,7 +435,7 @@ function fckeditor_profile_validate($edit) {
$fields = preg_split("/[\s,]+/", strip_tags($edit['simple_incl_fields']));
foreach ($fields as $field) {
- if ($field && !preg_match("/^[a-z]+(\-[[:alnum:]]+|\\*|\-\\*)+$/i", $field)) {
+ if ($field && !preg_match("/^[a-z]+(\-{1,2}[[:alnum:]]+|\\*|\-\\*)+$/i", $field)) {
$errors['simple_incl_fields'] = t("Invalid field specified: %1", array("%1" => $field));
break;
}
@@ -488,7 +488,7 @@ function fckeditor_global_profile_validate($edit) {
//validate fields
$fields = preg_split("/[\s,]+/", strip_tags($edit['excl_fields']));
foreach ($fields as $field) {
- if ($field && !preg_match("/^[a-z]+(\-[[:alnum:]]+|\\*|\-\\*)+$/i", $field)) {
+ if ($field && !preg_match("/^[a-z]+(\-{1,2}[[:alnum:]]+|\\*|\-\\*)+$/i", $field)) {
$errors['excl_fields'] = t("Invalid field specified: %1", array("%1" => $field));
break;
}
@@ -496,7 +496,7 @@ function fckeditor_global_profile_validate($edit) {
$fields = preg_split("/[\s,]+/", strip_tags($edit['simple_incl_fields']));
foreach ($fields as $field) {
- if ($field && !preg_match("/^[a-z]+(\-[[:alnum:]]+|\\*|\-\\*)+$/i", $field)) {
+ if ($field && !preg_match("/^[a-z]+(\-{1,2}[[:alnum:]]+|\\*|\-\\*)+$/i", $field)) {
$errors['simple_incl_fields'] = t("Invalid field specified: %1", array("%1" => $field));
break;
}