Closed Bug 218447 Opened 21 years ago Closed 21 years ago

keyword query with trailing "/" slash fails; keywords "www", "http" ignored

Categories

(Firefox :: Bookmarks & History, defect)

x86
All
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Firefox0.9

People

(Reporter: bugzilla, Assigned: noririty)

References

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030904 Firebird/0.6.1+ StumbleUpon/1.81 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030904 Firebird/0.6.1+ StumbleUpon/1.81 I have a bookmark with a keyword 'd' that takes me to a redirect script that keeps a history of the things I enter into it (deadman.org.) When I clear the URL bar and type "d http://www.iana.org/assignments/media-types' Firebird acts as expected. However, if I click on an HTML link to go to that URL above and then poistion my cursor at the beginning of the URL bar (with the url text still intact) and add a 'd ' (making it look like the above) I'm told that the URL is not valid and that it will not be loaded. Reproducible: Always Steps to Reproduce: 1. set up a keyword bookmark 2. type 'keyword url' 3. go to that url via a link 4. edit the URL bar adding 'keyword ' to the beginning Actual Results: I'm told that the URL is not valid and that it will not be loaded. Expected Results: The keyword should work as if the user had typed the whole thing in by hand.
Works for me using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030904 Firebird/0.6.1+
I can reproduce on winXP Gecko/20030913 Firebird/0.6.1+ different method to reproduce: 1. go to www.mozilla.org 2. enter URL bar and type dict keyword in front of URL the URL bar now looks like: [dict http://www.mozilla.org] 3. push enter Actual Results: popUp with URL not valid... OS -> All setting severity: minor easy workaround (type URL or use copy & paste). confirming.
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
FWIW, this makes life hell under Linux where the cut and paste model is different than in Windows/Mac.
This is still working for me without issue. I've tested on Linux and WinXP nightlies and CVS builds.
*** Bug 222820 has been marked as a duplicate of this bug. ***
the dupe tipped me off on what is causing this. Clicking the link in comment 0 appends a / after the URI. With this character trailing, the keyword does not activate (Firebird is the culprit here, Seamonkey trunk does not exhibit this symptom)
Summary: keyword behavior differs when editing vs. starting from scratch → keywords fail to function with trailing "/" character
Blocks: 225791
Target Milestone: --- → Firebird0.10
Attached patch Diff to browser.js (deleted) — Splinter Review
Looks like it's matching the regex in canonizeUrl() which then prevents the getShortcutOrURI() (resolve bookmark keyword) call due to an early return. Attached is a patch with 10 lines of context (so we get the whole function in there) from browser.js. With patch this works for me. Note that the patch is generated from files from the 2003-12-03 nightly, so the line numbers may be off; also, I ignored indenting in the patch (moved a whole block into the if).
Attachment #136743 - Flags: review?
Attachment #136743 - Flags: review? → review?(p_ch)
This bug also prevents any keyword that starts with "www" or "http". Can we expand the summary? It should read: keywords fail to function with "www", "http", or trailing "/" character
*** Bug 226228 has been marked as a duplicate of this bug. ***
Summary: keywords fail to function with trailing "/" character → keyword query with trailing "/" slash fails; keywords "www", "http" ignored
reassigning to noririty@jcom.home.ne.jp as this is a regression caused by the patch to bug 177618. this was working in FB 0.6, broken in 0.7x, broken on 0.8 branch.
Assignee: p_ch → noririty
Keywords: regression
Comment on attachment 136743 [details] [diff] [review] Diff to browser.js sorry for being so late...
Attachment #136743 - Flags: review?(p_ch) → review+
Checked in by Neil Rashbrook. Thanks for the review, Pierre.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: Firefox1.0beta → Firefox0.9
sorry for bugspam, long-overdue mass reassign of ancient QA contact bugs, filter on "beltznerLovesGoats" to get rid of this mass change
QA Contact: mconnor → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: