You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2015/02/18 22:56:56 UTC

cordova-plugins git commit: Navigation Whitelist Plugin: Add application start page to allowed navigation origins

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 <ic...@chromium.org>
Authored: Wed Feb 18 16:56:34 2015 -0500
Committer: Ian Clelland <ic...@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