Closed
Bug 298169
Opened 20 years ago
Closed 10 years ago
When an invalid URL is entered, search using default search engine instead of displaying error
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: csthomas, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
|
3.41 KB,
patch
|
Biesinger
:
review+
bzbarsky
:
superreview-
|
Details | Diff | Splinter Review |
If the user enters an invalid url (e.g. "mozilla foundation") we should use that as input to the default search engine, instead of displaying the invalid URL message. This should not occur if the input is something that is already handled some other way (e.g. adding www. and .com, a bookmark keyword search, etc). It should default to being pref'd off, because I think most users would find it confusing that "mozilla" takes them to www.mozilla.org while "mozilla foundation" results in a google search. For me, this is most useful when I simply forget to hit "up" before hitting enter while trying to do a search from the URL bar.
| Reporter | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Seamonkey1.0alpha
| Reporter | ||
Comment 1•20 years ago
|
||
Attachment #186739 -
Flags: review?(cbiesinger)
| Reporter | ||
Updated•20 years ago
|
Attachment #186739 -
Attachment is obsolete: true
Attachment #186739 -
Flags: review?(cbiesinger)
Updated•20 years ago
|
Assignee: cst → adamlock
Status: ASSIGNED → NEW
Component: General → Embedding: Docshell
Product: Mozilla Application Suite → Core
QA Contact: general → adamlock
Target Milestone: Seamonkey1.0alpha → ---
Updated•20 years ago
|
Assignee: adamlock → cst
Comment 2•20 years ago
|
||
Comment on attachment 186739 [details] [diff] [review] patch so, this patch's approach is probably ok, since internet keywords also affect single words typed into the urlbar. hm.. although, maybe a new nsIURIFixup flag would be better?
Attachment #186739 -
Attachment is obsolete: false
| Reporter | ||
Comment 3•19 years ago
|
||
Attachment #186739 -
Attachment is obsolete: true
Attachment #188008 -
Flags: review?(cbiesinger)
| Reporter | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [cst:r?]
Comment 4•19 years ago
|
||
Comment on attachment 188008 [details] [diff] [review] patch with less colorful language + if (mPrefs && NS_SUCCEEDED(mPrefs->GetBoolPref("browser.search.searchIfInvalidURL", &shouldSearch)) please try to keep lines under 80 columns... and oeprators should be put at the end of lines. maybe: if (mPrefs && NS_SUCCEEDED(mPrefs->GetBoolPref("browser.search.searchIfInvalidURL", &shouldSearch)) && although that still doesn't quite fit. I'm not sure that the pref name is great... but I have no better suggestion r=biesi with that line length change
Attachment #188008 -
Flags: superreview?(bzbarsky)
Attachment #188008 -
Flags: review?(cbiesinger)
Attachment #188008 -
Flags: review+
Comment 5•19 years ago
|
||
Doesn't firefox already do this, without the docshell hook? Does that mean that they have some sort of hack that could be removed in favor of this pref now?
Comment 6•19 years ago
|
||
(In reply to comment #5) > Doesn't firefox already do this, without the docshell hook? Does that mean that > they have some sort of hack that could be removed in favor of this pref now? Firefox does already do this, and I see a bunch of code lying around in docshell to handle this, so wouldn't it be somewhat trivial to make it work for Seamonkey? See http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/docshell/base/nsDefaultURIFixup.cpp#264 http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/docshell/base/nsDefaultURIFixup.cpp#693 and bug 261608, bug 245597.
| Reporter | ||
Comment 7•19 years ago
|
||
I suspect this patch breaks alt+enter on SeaMonkey.
Comment 8•19 years ago
|
||
Comment on attachment 188008 [details] [diff] [review] patch with less colorful language sr- pending response to comment 5.
Attachment #188008 -
Flags: superreview?(bzbarsky) → superreview-
| Reporter | ||
Comment 9•19 years ago
|
||
(In reply to comment #8) > (From update of attachment 188008 [details] [diff] [review] [edit]) > sr- pending response to comment 5. Firefox does an "I'm feeling lucky" search when you type multiple words in the URL bar.
Whiteboard: [cst:r?]
Comment 10•19 years ago
|
||
(In reply to comment #9) > Firefox does an "I'm feeling lucky" search when you type multiple words in the > URL bar. I'd be very much against that and for a normal search instead for SeaMonkey...
Comment 11•19 years ago
|
||
what url is loaded is a pref...
| Reporter | ||
Comment 12•19 years ago
|
||
(In reply to comment #11) > what url is loaded is a pref... ...which shouldn't default to I'm Feeling Lucky.
Comment 13•19 years ago
|
||
> Firefox does an "I'm feeling lucky" search when you type multiple words in the
> URL bar.
Sure. So all it's doing is opening some URL defined by the app, right? Why
can't you do the same, with the URL coming from whatever prefs we have set to
pick the default search engine?
Put another way, how is "google I'm feeling lucky search" anything other than
"default search engine" for Firefox?
Comment 14•19 years ago
|
||
Not much different. Except the searches in the search bar are defined by mycroft plugins, while the keyword search from the url is simply appended to a url taken from a pref. Also note there are a couple of bugs in firefox's handling of this feature: bug 245597 and bug 295991
| Reporter | ||
Comment 15•18 years ago
|
||
-> someone else
Assignee: cst → nobody
Status: ASSIGNED → NEW
QA Contact: adamlock → docshell
Comment 16•17 years ago
|
||
I've wished for this for some time in Mozilla/Seamonkey. If I hadn't found this bug, I was going to submit one, asking that the presence of a space character be used to filter, so "mozilla" might resolve to mozilla.com, while "mozilla browser" would produce a search for both words. Didn't realize until reading here that FF does this already, except it's an "I feel lucky" search, which is almost worthless. After some looking, I found that this can be fixed by changing the value of "keyword.URL" from this: http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q= to this: http://www.google.com/search?ie=UTF-8&oe=utf-8&q= Better, but doesn't help me, since I dislike FF. But I wondered: could I enable the FF behaviour in Seamonkey simply by editing preferences? Turns out that I can. By changing "keyword.enabled" from false to true, Seamonkey behaves as this bug asks, unless I misunderstand it. I'm happy, at least. My next thought was to make this configuration option more accessible, with a checkbox description reading something like "treat multiple words in location bar as search terms". But again, I found that I'm behind. There already is a setting to do that under "Smart Browsing": "Enable Internet Keywords". Not as descriptive as I'd like, but it *is* there. So why isn't it on by default? Looks like that question leads to another bug: http://bugzilla.mozilla.org/show_bug.cgi?id=197918
Comment 17•10 years ago
|
||
I think we are pretty good at doing this these days, and so I'm closing WFM - please file new bugs with more specifics if there are cases that we still get wrong / that don't work.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•