Closed Bug 115139 Opened 23 years ago Closed 23 years ago

DNS: internet keywords fail if dot character found (two line patch provides oodles of functionality)

Categories

(SeaMonkey :: Location Bar, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 79655

People

(Reporter: m_mozilla, Assigned: hewitt)

Details

ideal world: set internet keywords to use google for searches set default search engine to search bugzilla set url-autocomplete to show search (with bugzilla) get rid of search button on URL toolbar because keywords does it for me actual world: the above works just fine except when you try to search for +site:foo.com download or Mr. Ed or something like that (note the '.' in each of those) in which case Mozilla thinks you have a url and not a keyword search It seems that "a dot in the URL bar" is a bit too simple. The relevent code is http://lxr.mozilla.org/seamonkey/source/docshell/base/nsWebShell.cpp#957 wrote: 957> PRInt32 dotLoc = hostStr.FindChar('.'); : 994> if(keywordsEnabled && (-1 == dotLoc)) { I'm not sure what sort of regular expression library is available in C, but I can tell from empirical testing that Mozilla strips off initial and trailing whitespace, and I'm guessing that happens before the above line 994. So, a very very nice first step might be as simple as doing a FindChar to see if we find a space. The previous line 994 becomes the following two lines: 994> PRInt32 spaceLoc = hostStr.FindChar(' '); 995> if( keywordsEnabled && ( (spaceLoc > -1) || (-1 == dotLoc) ) ) { This would enable *very* convenient searching from the URL bar for a whole class of searches which are currently not possible. I'd make a patch, but I don't yet have the source on my machine, and I'm hoping that this is a trivial patch to create for someone who has already been writting patches. -matt
Resolving as duplicate of bug 79655 Please reopen if you disagree with this resolution. *** This bug has been marked as a duplicate of 79655 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
VERIFIED: This is a DNS parsing issue, so I'm verifying it. Claudius, I'll take QA ownership too, if you don't mind.
Status: RESOLVED → VERIFIED
QA Contact: claudius → benc
Summary: internet keywords fail if dot character found (two line patch provides oodles of functionality) → DNS: internet keywords fail if dot character found (two line patch provides oodles of functionality)
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.