summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-08-06 17:05:50 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-08-06 17:05:50 +0200
commite7a85a445c156351c78a1b5dabbd5c7993078934 (patch)
treec07808fd8199501c60321f53c6b37eef997ca766 /process_bug.cgi
parentBug 1183227: Comment tagging doesn't work if Test::Taint is not installed (diff)
downloadbugzilla-e7a85a445c156351c78a1b5dabbd5c7993078934.tar.gz
bugzilla-e7a85a445c156351c78a1b5dabbd5c7993078934.tar.bz2
bugzilla-e7a85a445c156351c78a1b5dabbd5c7993078934.zip
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 b3ed2d36a..216dfbf1b 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -348,7 +348,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;