summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-03-17 05:15:29 +0100
committerlpsolit%gmail.com <>2007-03-17 05:15:29 +0100
commit604ccd0da5801d61ad240ae6fd4ddee2ab36d91b (patch)
treea10dead7691ddf291e680d9c796e839251b4a921 /Bugzilla/Search
parent75608afda9bb02d965f7be22f385ddf9f888baea (diff)
downloadbugzilla-604ccd0da5801d61ad240ae6fd4ddee2ab36d91b.tar.gz
bugzilla-604ccd0da5801d61ad240ae6fd4ddee2ab36d91b.tar.xz
Bug 366120: QuickSearch gets confused by colons in quotes - Patch by Teemu Mannermaa <wicked+bz@etlicon.fi> r/a=LpSolit
Diffstat (limited to 'Bugzilla/Search')
-rw-r--r--Bugzilla/Search/Quicksearch.pm18
1 files changed, 6 insertions, 12 deletions
diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm
index a9111fe0c..4145ff7c4 100644
--- a/Bugzilla/Search/Quicksearch.pm
+++ b/Bugzilla/Search/Quicksearch.pm
@@ -410,28 +410,22 @@ sub splitString {
my @parts;
my $i = 0;
- # Escape backslashes
- $string =~ s/\\/\\\//g;
-
# Now split on quote sign; be tolerant about unclosed quotes
@quoteparts = split(/"/, $string);
- foreach (@quoteparts) {
- # After every odd quote, escape whitespace
- s/(\s)/\\$1/g if $i++ % 2;
+ foreach my $part (@quoteparts) {
+ # After every odd quote, quote special chars
+ $part = url_quote($part) if $i++ % 2;
}
# Join again
$string = join('"', @quoteparts);
# Now split on unescaped whitespace
- @parts = split(/(?<!\\)\s+/, $string);
+ @parts = split(/\s+/, $string);
foreach (@parts) {
- # Restore whitespace
- s/\\(\s)/$1/g;
- # Restore backslashes
- s/\\\//\\/g;
# Remove quotes
s/"//g;
}
+
return @parts;
}
@@ -502,7 +496,7 @@ sub makeChart {
my $cgi = Bugzilla->cgi;
$cgi->param("field$expr", $field);
$cgi->param("type$expr", $type);
- $cgi->param("value$expr", $value);
+ $cgi->param("value$expr", url_decode($value));
}
1;