From 7f1e1ce62d7e178790f338c3ac447466bc67da88 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 9 Sep 2014 14:06:45 +0800 Subject: Bug 1054138: add the ability to filter on "fields containing the string" --- extensions/BugmailFilter/lib/Filter.pm | 2 +- .../template/en/default/hook/global/user-error-errors.html.tmpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'extensions/BugmailFilter') diff --git a/extensions/BugmailFilter/lib/Filter.pm b/extensions/BugmailFilter/lib/Filter.pm index 5e83bd52a..a20f472d5 100644 --- a/extensions/BugmailFilter/lib/Filter.pm +++ b/extensions/BugmailFilter/lib/Filter.pm @@ -146,7 +146,7 @@ sub _check_field_name { return undef unless $field_name; if (substr($field_name, 0, 1) eq '~') { $field_name = lc(trim($field_name)); - $field_name =~ /^~[a-z0-9_\.]+$/ + $field_name =~ /^~[a-z0-9_\.\-]+$/ || ThrowUserError('bugmail_filter_invalid'); length($field_name) <= 64 || ThrowUserError('bugmail_filter_too_long'); diff --git a/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl index 4be894c6f..a0ec2125f 100644 --- a/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl +++ b/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl @@ -16,7 +16,7 @@ [% ELSIF error == "bugmail_filter_invalid" %] [% title = "Invalid Field Name" %] - The field name contains invalid characters (alpha-numeric, underscore and - period only). + The field name contains invalid characters (alpha-numeric, underscore, + hyphen, and period only). [% END %] -- cgit v1.2.3-24-g4f1b