Awesomebar does not handle some punctuation properly




Address Bar
7 years ago
6 years ago


(Reporter: Harry, Unassigned)


Windows 7

Firefox Tracking Flags

(Not tracked)



(1 attachment)



7 years ago
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".

Comment 1

7 years ago
* foo/bar
* foo\bar
* foo#bar
* foo?bar
Summary: Awesomebar does not handle semicolons properly → Awesomebar does not handle some punctuation properly

Comment 2

7 years ago
Created attachment 506493 [details]
Illustrative incomplete patch

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.


7 years ago
Version: unspecified → 4.0 Branch

Comment 3

6 years ago
This is WFM with the latest nightly. Harry, can you still reproduce?

Comment 4

6 years ago
Tim: foo;bar indeed works.

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

Do not.

Comment 5

6 years ago to reproduce with items in comment 1.

Quick search shows no duplicates, so confirming
Ever confirmed: true
Version: 4.0 Branch → Trunk
You need to log in before you can comment on or make changes to this bug.