diff --git a/webtools/bugzilla/editkeywords.cgi b/webtools/bugzilla/editkeywords.cgi index 72fe78bf07e5..3443a5c3f717 100755 --- a/webtools/bugzilla/editkeywords.cgi +++ b/webtools/bugzilla/editkeywords.cgi @@ -88,8 +88,8 @@ sub Validate ($$) { PutTrailer($localtrailer); exit; } - if ($name =~ /,/) { - print "You may not use commas in a keyword name.\n"; + if ($name =~ /[\s,]/) { + print "You may not use commas or whitespace in a keyword name.\n"; print "Please press Back and try again.\n"; PutTrailer($localtrailer); exit; diff --git a/webtools/bugzilla/sanitycheck.cgi b/webtools/bugzilla/sanitycheck.cgi index 33890be78733..08fbbfb8f215 100755 --- a/webtools/bugzilla/sanitycheck.cgi +++ b/webtools/bugzilla/sanitycheck.cgi @@ -234,7 +234,7 @@ while (@row = FetchSQLData()) { Alert("Duplicate entry in keyworddefs for id $id"); } $keywordids{$id} = 1; - if ($name =~ /,/ || $name =~ /^\s/ || $name =~ /\s$/) { + if ($name =~ /[\s,]/) { Alert("Bogus name in keyworddefs for id $id"); } }