cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [4/4] android commit: Add about:blank and data: to default shouldAllowNavigation()
Date Tue, 03 Mar 2015 02:40:58 GMT
Add about:blank and data: to default shouldAllowNavigation()


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/eccf4861
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/eccf4861
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/eccf4861

Branch: refs/heads/master
Commit: eccf486162a75da572b4b6d3eca0c5eb75ad3949
Parents: a6da46a
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Mon Mar 2 21:40:28 2015 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Mon Mar 2 21:40:28 2015 -0500

----------------------------------------------------------------------
 framework/src/org/apache/cordova/PluginManager.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/eccf4861/framework/src/org/apache/cordova/PluginManager.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/PluginManager.java b/framework/src/org/apache/cordova/PluginManager.java
index 4787542..57e5012 100755
--- a/framework/src/org/apache/cordova/PluginManager.java
+++ b/framework/src/org/apache/cordova/PluginManager.java
@@ -325,8 +325,10 @@ public class PluginManager {
         }
 
         // Default policy:
-        // Internal urls on file:// or data:// that do not contain "/app_webview/" are allowed
for navigation
-        if (url.startsWith("file://") || url.startsWith("data:")) {
+        if (url.startsWith("data:") || url.startsWith("about:blank")) {
+            return true;
+        }
+        if (url.startsWith("file://")) {
             //This directory on WebKit/Blink based webviews contains SQLite databases!
             //DON'T CHANGE THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
             return !url.contains("/app_webview/");
@@ -362,7 +364,7 @@ public class PluginManager {
         }
 
         // Default policy:
-        return url.startsWith("file://");
+        return url.startsWith("file://") || url.startsWith("about:blank");
     }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message