cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject android commit: [CB-3226] Fix: plugins can intercept urls with "?", "#", "%20"(cherry picked from commit 53982272d694b0bcc2093e8374b3a6fdd64b97fa)
Date Thu, 25 Apr 2013 17:11:25 GMT
Updated Branches:
  refs/heads/2.7.x b22990ca7 -> 665c1bd8b


[CB-3226] Fix: plugins can intercept urls with "?", "#", "%20"(cherry picked from commit 53982272d694b0bcc2093e8374b3a6fdd64b97fa)


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

Branch: refs/heads/2.7.x
Commit: 665c1bd8bbfa3cecf30f9ac717dbde91fba852ee
Parents: b22990c
Author: Shravan Narayan <shravanrn@google.com>
Authored: Wed Apr 24 18:59:24 2013 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Apr 25 13:11:02 2013 -0400

----------------------------------------------------------------------
 .../cordova/IceCreamCordovaWebViewClient.java      |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/665c1bd8/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java b/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java
index 375282e..847972e 100644
--- a/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java
+++ b/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java
@@ -43,13 +43,12 @@ public class IceCreamCordovaWebViewClient extends CordovaWebViewClient
{
 
     @Override
     public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
-        if(url.contains("?") || url.contains("#") || needsIceCreamSpaceInAssetUrlFix(url)){
-            WebResourceResponse ret = generateWebResourceResponse(url);
-            if (ret != null) {
-                return ret;
-            }
+        //Check if plugins intercept the request
+        WebResourceResponse ret = super.shouldInterceptRequest(view, url);
+        if(ret == null && (url.contains("?") || url.contains("#") || needsIceCreamSpaceInAssetUrlFix(url))){
+            ret = generateWebResourceResponse(url);
         }
-        return super.shouldInterceptRequest(view, url);
+        return ret;
     }
 
     private WebResourceResponse generateWebResourceResponse(String url) {


Mime
View raw message