Closed Bug 366120 Opened 18 years ago Closed 17 years ago

QuickSearch gets confused by colons in quotes

Categories

(Bugzilla :: Query/Bug List, defect)

2.23.3
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: jruderman, Assigned: wicked)

References

Details

(Keywords: regression)

Attachments

(1 file)

1. Search BMO for:
  float "sg:cri"

Result: all float bugs are returned.

Expected: only sg:critical float bugs should be returned.

I put the quotes around "sg:cri" because I didn't want the colon to confuse Bugzilla, but I guess it got confused anyway.
Blocks: 70907
Keywords: regression
Quoting only preserves whitespace and so doesn't protect any colons. That word becomes |sg:cri| but as sg is not a known field it will just be ignored. Previously this would have resulted in an "unknown field" error (see bug 365082).
Yes, it does seem that way.  Commas break it too: https://bugzilla.mozilla.org/buglist.cgi?quicksearch=ALL+%22no+frame,+see+bug%22
Severity: normal → minor
Version: unspecified → 2.23.3
Attached patch Fix quoting, V1Splinter Review
Looks like JS version actually used escape/unescape to quote things between quotes. That way it preserved special characters like colon and comma in addition to whitespace. This patch brings back this support by using url_quote/url_decode functions from Util.pm instead own code to preserver whitespace only.
Assignee: query-and-buglist → wicked+bz
Status: NEW → ASSIGNED
Attachment #258684 - Flags: review?(LpSolit)
Comment on attachment 258684 [details] [diff] [review]
Fix quoting, V1

Works fine. r=LpSolit for 3.0 and tip. Maybe should we allow to protect quotes using \" so that you could correctly find fields having quotes in them. This can be done later.
Attachment #258684 - Flags: review?(LpSolit) → review+
Flags: approval3.0+
Flags: approval+
Target Milestone: --- → Bugzilla 3.0
tip:

Checking in Bugzilla/Util.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Util.pm,v  <--  Util.pm
new revision: 1.57; previous revision: 1.56
done
Checking in Bugzilla/Search/Quicksearch.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search/Quicksearch.pm,v  <--  Quicksearch.pm
new revision: 1.14; previous revision: 1.13
done


3.0 RC1:

Checking in Bugzilla/Util.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Util.pm,v  <--  Util.pm
new revision: 1.56.2.1; previous revision: 1.56
done
Checking in Bugzilla/Search/Quicksearch.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search/Quicksearch.pm,v  <--  Quicksearch.pm
new revision: 1.12.2.1; previous revision: 1.12
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: