From 604ccd0da5801d61ad240ae6fd4ddee2ab36d91b Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 17 Mar 2007 04:15:29 +0000 Subject: Bug 366120: QuickSearch gets confused by colons in quotes - Patch by Teemu Mannermaa r/a=LpSolit --- Bugzilla/Search/Quicksearch.pm | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'Bugzilla/Search') 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(/(?cgi; $cgi->param("field$expr", $field); $cgi->param("type$expr", $type); - $cgi->param("value$expr", $value); + $cgi->param("value$expr", url_decode($value)); } 1; -- cgit v1.2.3-24-g4f1b