Closed Bug 441201 Opened 17 years ago Closed 17 years ago

Using bookmark keyword in the location bar does not correctly URL escape the plus ("+") character

Categories

(Firefox :: Address Bar, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 359809

People

(Reporter: bwp, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; da; rv:1.9) Gecko/2008052912 Firefox/3.0 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; da; rv:1.9) Gecko/2008052912 Firefox/3.0 I have Google search as a bookmark keyword (it is "g"). If I enter "g c++" in the location bar, to search for something related to C++, I just get search results on "C". This is because the value is inserted directly in the URL (like "http://www.google.dk/search?hl=en&q=c++&meta="). The plus ("+") characters are interpreted as spaces in the query string of the URL. Reproducible: Always Steps to Reproduce: 1. Go to http://www.google.com/ 2. Right click on the search field and choose "Add a keyword to this search..." 3. Enter "Google" in the Name field and "google" in the Keyword field. Click Add. 4. Go to the location bar and enter "google c++". Press ENTER. Actual Results: The search field on the resulting Google page contains "c " (the character "c" and two spaces). Also the plus ("+") character is not escaped in the query string of the URL. The URL is like this: http://www.google.com/search?hl=en&rlz=&=&q=c++ Also see that Google gives you the speed of light as a result, not something related to C++ programming. Expected Results: A Google search result page on "C++". The URL should be like this: http://www.google.com/search?hl=en&rlz=&=&q=c%2B%2B If you try to enter "google c%2B%2B" as you expect it doesn't escape the value as all, you'll notice that is actually escapes the percent signs ("%"). As far as I can tell it is only the plus ("+") character that is not properly encoded.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 This works correctly for me on Windows. I believe I've seen this bug before.
Whiteboard: [DUPEME]
(In reply to comment #1) > Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 > Firefox/3.0 > > This works correctly for me on Windows. I believe I've seen this bug before. > Doesn't work for me correctly on Mac. And you probably have seen this before :-)
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Whiteboard: [DUPEME]
Yeah, in my default profile it goes to http://www.google.nl/search?hl=nl&q=c%2B%2B&meta= (probably caused by some forgotten construction).
You need to log in before you can comment on or make changes to this bug.