From 53982272d694b0bcc2093e8374b3a6fdd64b97fa Mon Sep 17 00:00:00 2001 From: Shravan Narayan Date: Wed, 24 Apr 2013 18:59:24 -0400 Subject: [PATCH] [CB-3226] Fix: plugins can intercept urls with "?", "#", "%20" --- .../apache/cordova/IceCreamCordovaWebViewClient.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java b/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java index 375282ec..847972ee 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) {