Closed Bug 296038 Opened 20 years ago Closed 16 years ago

new keyword search with uppercase keyword does not work

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Peter6, Unassigned)

Details

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050527
Firefox/1.0+ ID:2005052711

repro:
1. open
http://talkback-public.mozilla.org/talkback/fastfind.jsp?search=2&type=iid&id=
2. rightclick on the "Talkback Incident ID" input and select "ädd a keyword for
this search"
3.name the keyword in UPPERCASE letters XX
4.type XX 12345 in the locationbar
5.result , firefox starts a feel lucky search

create the same bookmark with lowercase letters and it opens talkback fastfind
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511
Firefox/1.0.4
Confirmed. Quicksearch bookmarks are apparently case-sensitive and
case-insensitive at the same time.
If you create a keyword search with keyword "XX", "XX 1234" and "xx 1234" don't
work.
Inversely, if you create a keyword search with keyword "xx", both "XX 1234" and
"xx 1234" work.
I'm guessing that whatever you write in the URL bar is first lower-cased and
then compared (case-sensitively) to any available keywords. I think the best
solution is to make a case-insensitive comparison when looking for matching
keywords.
Looking at
http://lxr.mozilla.org/aviary101branch/source/browser/components/bookmarks/src/nsBookmarksService.cpp#3460
I confirmed that in fact the keyword is lower-cased, but as far as I can see
making a case-insensitive comparison doesn't seem viable.
Other possible solutions:
1. Lower-case the keyword when storing it in the bookmarks RDF. This has the con
that the user is unaware of this, so having xx and XX as different keyword
searches yield unwanted results.
2. Restrict keywords to lower-case. Add a validation in the Add Bookmark window
to let the user know that only lower-case keywords are allowed. This has the
slight con that makes the browser seem a little inflexible or unfriendly.
OS: Windows 2000 → All
Hardware: PC → All
(In reply to comment #2)
> 1. Lower-case the keyword when storing it in the bookmarks RDF. This has the con
> that the user is unaware of this, so having xx and XX as different keyword
> searches yield unwanted results.

Why is this true? If everything is treated as lowercase internally, and the typed keyword is converted to lowercase before looking it up, then storing it as lowercase should mean that XX and xx are equivalent, no?
Yes, going with (1) would make XX and xx the same. It means that you can't create two different keyword searches that only differ in capitalization. It's not so bad, because I don't think people tend to have searches called abC, abc, AbC. It's very confusing. They can't have those now, anyway, because any capital letter in the keyword will produce this bug.
What it would fix is that when the user inputs XX "search string" in the location bar, it would actually work. It's a significant gain, with little loss IMO.
Oh, and what I meant with the "con" is that if you create two keyword searches XX and xx, only one of them will respond to searches with either keyword. But that is something that already happens. If you create 2 different searches with the same name, and you can, the last one created will prevail. The "con" with approach (1) is that this behavior would be extended to all possible capitalizations of the word.
Sorry for the bugspam.
WFM:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090115 Shiretoko/3.1b3pre
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.