From 672fe6de4aee1eecea76ff4e6426f1d4a3262724 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 6 Aug 2015 17:04:28 +0200 Subject: Bug 1191510: Tags with spaces in them are incorrectly split into several tags r=gerv a=dkl --- process_bug.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'process_bug.cgi') 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; -- cgit v1.2.3-24-g4f1b