From: jake%acutex.net <> Date: Sat, 18 Aug 2001 10:35:36 +0000 (+0000) Subject: Refixing bug 95875 - The code that breakes the typed in CC list into individual lists... X-Git-Tag: bugzilla-2.14~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19fac474c4e5c37062fe55633943846430ef549f;p=thirdparty%2Fbugzilla.git Refixing bug 95875 - The code that breakes the typed in CC list into individual lists is now slightly more robust and allows perl to handle the splitting more efficiently (by using a space as the delimiter). r= myk@mozilla.org --- diff --git a/process_bug.cgi b/process_bug.cgi index 5bb180c5a3..82e9cb9889 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -582,15 +582,15 @@ if (defined $::FORM{newcc} || defined $::FORM{removecc} || defined $::FORM{massc } if ($cc_add) { - $cc_add =~ s/^[\s,]+//; # Remove leading delimiters. - foreach my $person ( split(/[\s,]+/, $cc_add) ) { + $cc_add =~ s/[\s,]+/ /g; # Change all delimiters to a single space + foreach my $person ( split(" ", $cc_add) ) { my $pid = DBNameToIdAndCheck($person); $cc_add{$pid} = $person; } } if ($cc_remove) { - $cc_remove =~ s/^[\s,]+//; # Remove leading delimiters. - foreach my $person ( split(/[\s,]+/, $cc_remove) ) { + $cc_remove =~ s/[\s,]+/ /g; # Change all delimiters to a single space + foreach my $person ( split(" ", $cc_remove) ) { my $pid = DBNameToIdAndCheck($person); $cc_remove{$pid} = $person; }