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

  • From: noreply@xxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Wed, 1 Jun 2011 22:06:11 +0200 (CEST)

Author: leavengood
Date: Wed Jun  1 22:06:11 2011
New Revision: 579
URL: http://webpositive.haiku-os.org/changeset/579

Log:
Don't do the "smart URL handling" (also known as dumb URL handling) for file:// 
URLs.

Fixes #7596.

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 
21:46:55 2011        (r578)
+++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp     Wed Jun  1 
22:06:11 2011        (r579)
@@ -2130,8 +2130,12 @@
 BrowserWindow::_SmartURLHandler(const BString& url) const
 {
        BString result = url;
-       if (url.FindFirst(".") == B_ERROR || url.FindFirst(" ") != B_ERROR)
-               result.Prepend("http://www.google.com/search?q=";);
+
+       // Only process if the URL is not for a local file
+       if (url.FindFirst("file://") == B_ERROR) {
+               if (url.FindFirst(".") == B_ERROR || url.FindFirst(" ") != 
B_ERROR)
+                       result.Prepend("http://www.google.com/search?q=";);
+       }
        return result;
 }
 

Other related posts: