From: lpsolit%gmail.com <> Date: Sat, 17 Mar 2007 04:17:34 +0000 (+0000) Subject: Bug 366120: QuickSearch gets confused by colons in quotes - Patch by Teemu Mannermaa... X-Git-Tag: bugzilla-3.0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d5468a96e4bd00d6a711856c4951164cd455b09;p=thirdparty%2Fbugzilla.git Bug 366120: QuickSearch gets confused by colons in quotes - Patch by Teemu Mannermaa r/a=LpSolit --- diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm index 4cb34eda89..83746ed5f0 100644 --- a/Bugzilla/Search/Quicksearch.pm +++ b/Bugzilla/Search/Quicksearch.pm @@ -409,28 +409,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; diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 4a87ff0420..e97bb11d0c 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -34,7 +34,7 @@ use base qw(Exporter); @Bugzilla::Util::EXPORT = qw(is_tainted trick_taint detaint_natural detaint_signed html_quote url_quote value_quote xml_quote - css_class_quote html_light_quote + css_class_quote html_light_quote url_decode i_am_cgi get_netaddr correct_urlbase lsearch diff_arrays diff_strings