[haiku-webkit-commits] r580 - webkit/trunk/WebKit/haiku/WebPositive

  • From: noreply@xxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Wed, 1 Jun 2011 23:43:31 +0200 (CEST)

Author: leavengood
Date: Wed Jun  1 23:43:31 2011
New Revision: 580
URL: http://webpositive.haiku-os.org/changeset/580

Log:
Make the check for URLs more generic before doing a search.
Thanks for the suggestion mmlr.

Modified:
   webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp

Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp     Wed Jun  1 
22:06:11 2011        (r579)
+++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp     Wed Jun  1 
23:43:31 2011        (r580)
@@ -2131,8 +2131,9 @@
 {
        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=";);
        }

Other related posts:

  • » [haiku-webkit-commits] r580 - webkit/trunk/WebKit/haiku/WebPositive - noreply