Closed Bug 626204 Opened 13 years ago Closed 6 years ago

Awesomebar does not handle some punctuation properly

Categories

(Firefox :: Address Bar, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: jarry1250, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows NT 6.1; rv:2.0b9) Gecko/20100101 Firefox/4.0b9
Build Identifier: Mozilla/5.0 (Windows NT 6.1; rv:2.0b9) Gecko/20100101 Firefox/4.0b9

If a query is entered which includes one or more semicolons, the resulting Google search will only be for that part of the query before the first semicolon.

Reproducible: Always

Steps to Reproduce:
1. Type "foo;bar" into the awesomebar (without the quotes)
2. Hit enter
Actual Results:  
A Google search for "foo".

Expected Results:  
A Google search for "foo;bar".
Also:
* foo/bar
* foo\bar
* foo#bar
* foo?bar
Summary: Awesomebar does not handle semicolons properly → Awesomebar does not handle some punctuation properly
The issue is in EndPageLoad, around lines 6181, when it calls KeywordtoURI. It doesn't have access to what was originally entered, only a nsIURI representation of it. It then passes on host, except some punctuation causes anything after it to be broken up into the path section (pre-pended with a /). Only by putting these back together (and removing the extra /) is the original even approximated, and that is what the patch aims to do.

It doesn't, however, fix forward and backward slashes properly - since these are converted into /s anyway, nsIURI doesn't both adding another one, so the lone slash then gets removed :( It also need a URI-decode built in, because spaces get Googled as %20s at the moment. But it's a start.
Version: unspecified → 4.0 Branch
This is WFM with the latest nightly. Harry, can you still reproduce?
Tim: foo;bar indeed works.

However, all my other examples:
* foo/bar
* foo\bar
* foo#bar
* foo?bar

Do not.
HMM....able to reproduce with items in comment 1.

Quick search shows no duplicates, so confirming
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 4.0 Branch → Trunk
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: