cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject cordova-plugins git commit: Navigation Whitelist Plugin: Add application start page to allowed navigation origins
Date Wed, 18 Feb 2015 21:56:56 GMT
Repository: cordova-plugins
Updated Branches:
  refs/heads/master 47a7ecd27 -> dbbdb7548


Navigation Whitelist Plugin: Add application start page to allowed navigation origins


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

Branch: refs/heads/master
Commit: dbbdb75487b8fdb4207d99933174fa924034b212
Parents: 47a7ecd
Author: Ian Clelland <iclelland@chromium.org>
Authored: Wed Feb 18 16:56:34 2015 -0500
Committer: Ian Clelland <iclelland@chromium.org>
Committed: Wed Feb 18 16:56:34 2015 -0500

----------------------------------------------------------------------
 navigation-whitelist/src/android/NavigationWhitelistPlugin.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/dbbdb754/navigation-whitelist/src/android/NavigationWhitelistPlugin.java
----------------------------------------------------------------------
diff --git a/navigation-whitelist/src/android/NavigationWhitelistPlugin.java b/navigation-whitelist/src/android/NavigationWhitelistPlugin.java
index 9dc6164..2e01891 100644
--- a/navigation-whitelist/src/android/NavigationWhitelistPlugin.java
+++ b/navigation-whitelist/src/android/NavigationWhitelistPlugin.java
@@ -35,12 +35,13 @@ public class NavigationWhitelistPlugin extends CordovaPlugin {
 
     public void initialize(CordovaInterface cordova, CordovaWebView webView) {
 
+        allowedNavigationPatterns.addWhiteListEntry("file:///android_asset/www/*", false);
         new ConfigXmlParser(){
             public void handleStartTag(XmlResourceParser xml) {
                 String strNode = xml.getName();
                 if (strNode.equals("content")) {
                     String startPage = xml.getAttributeValue(null, "src");
-                    allowedNavigationPatterns.addWhiteListEntry("file:///*", false);
+                    allowedNavigationPatterns.addWhiteListEntry(startPage, false);
                 } else if (strNode.equals("allow-navigation")) {
                     String origin = xml.getAttributeValue(null, "href");
                     if ("*".equals(origin)) {


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


Mime
View raw message