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:
leavengood 2011-06-01 21:43:31 +00:00 committed by Alexandre Deckner
parent c17922668b
commit ae5b937ac2

View File

@ -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=");
}