summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-08-06 17:04:28 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-08-06 17:04:28 +0200
commit672fe6de4aee1eecea76ff4e6426f1d4a3262724 (patch)
treeec3b27b1673e65a94d81a1a8c6d38eb3150b8fcf /process_bug.cgi
parentffe87c77a303fc2de6cec14f4fc0990e5611f040 (diff)
downloadbugzilla-672fe6de4aee1eecea76ff4e6426f1d4a3262724.tar.gz
bugzilla-672fe6de4aee1eecea76ff4e6426f1d4a3262724.tar.xz
Bug 1191510: Tags with spaces in them are incorrectly split into several tags
r=gerv a=dkl
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi2
1 files changed, 1 insertions, 1 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 3deeb5f2e..6ed15a067 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -352,7 +352,7 @@ if (defined $cgi->param('id')) {
# Tags can only be set to one bug at once.
if (should_set('tag')) {
- my @new_tags = split(/[\s,]+/, $cgi->param('tag'));
+ my @new_tags = grep { trim($_) } split(/,/, $cgi->param('tag'));
my ($tags_removed, $tags_added) = diff_arrays($first_bug->tags, \@new_tags);
$first_bug->remove_tag($_) foreach @$tags_removed;
$first_bug->add_tag($_) foreach @$tags_added;