Commit 72a25ca7 authored by terry%mozilla.org's avatar terry%mozilla.org

Let's outlaw whitespace in keywords.

parent 17fc03c8
...@@ -88,8 +88,8 @@ sub Validate ($$) { ...@@ -88,8 +88,8 @@ sub Validate ($$) {
PutTrailer($localtrailer); PutTrailer($localtrailer);
exit; exit;
} }
if ($name =~ /,/) { if ($name =~ /[\s,]/) {
print "You may not use commas in a keyword name.\n"; print "You may not use commas or whitespace in a keyword name.\n";
print "Please press <b>Back</b> and try again.\n"; print "Please press <b>Back</b> and try again.\n";
PutTrailer($localtrailer); PutTrailer($localtrailer);
exit; exit;
......
...@@ -234,7 +234,7 @@ while (@row = FetchSQLData()) { ...@@ -234,7 +234,7 @@ while (@row = FetchSQLData()) {
Alert("Duplicate entry in keyworddefs for id $id"); Alert("Duplicate entry in keyworddefs for id $id");
} }
$keywordids{$id} = 1; $keywordids{$id} = 1;
if ($name =~ /,/ || $name =~ /^\s/ || $name =~ /\s$/) { if ($name =~ /[\s,]/) {
Alert("Bogus name in keyworddefs for id $id"); Alert("Bogus name in keyworddefs for id $id");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment