Make the check for URLs more generic before doing a search.
Thanks for the suggestion mmlr. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@580 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
parent
c17922668b
commit
ae5b937ac2
@ -2131,8 +2131,9 @@ BrowserWindow::_SmartURLHandler(const BString& url) const
|
||||
{
|
||||
BString result = url;
|
||||
|
||||
// Only process if the URL is not for a local file
|
||||
if (url.FindFirst("file://") == B_ERROR) {
|
||||
// Only process if this doesn't look like a full URL (http:// or
|
||||
// file://, etc.)
|
||||
if (url.FindFirst("://") == B_ERROR) {
|
||||
if (url.FindFirst(".") == B_ERROR || url.FindFirst(" ") != B_ERROR)
|
||||
result.Prepend("http://www.google.com/search?q=");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user