Compare commits

...

5 Commits

Author SHA1 Message Date
Joe Bowser 909e6645e7 Updating JS for Android 2013-04-25 14:55:11 -07:00
Joe Bowser a308100288 Prep for 2.7.0 final 2013-04-25 13:42:20 -07:00
Joe Bowser fea8c5d204 Merge branch '2.7.x' of https://git-wip-us.apache.org/repos/asf/cordova-android into 2.7.x 2013-04-25 10:20:07 -07:00
Joe Bowser a890c8156e This should be 2.7.0rc1 2013-04-25 10:19:48 -07:00
Shravan Narayan 665c1bd8bb [CB-3226] Fix: plugins can intercept urls with "?", "#", "%20"(cherry picked from commit 53982272d6) 2013-04-25 13:11:02 -04:00
2 changed files with 8 additions and 9 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
// Platform: android
// commit 360bd3e65c33ce4f01e2efb82d641a565ef3c333
// commit cd29cf0f224ccf25e9d422a33fd02ef67d3a78f4
// File generated at :: Fri Apr 19 2013 17:55:18 GMT-0700 (PDT)
// File generated at :: Thu Apr 25 2013 14:53:10 GMT-0700 (PDT)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -6813,7 +6813,7 @@ require('cordova/channel').onNativeReady.fire();
xhr.onload = function() {
// If the response is a JSON string which composes an array, call handlePluginsObject.
// If the request fails, or the response is not a JSON array, just call finishPluginLoading.
var obj = JSON.parse(this.responseText);
var obj = this.responseText && JSON.parse(this.responseText);
if (obj && obj instanceof Array && obj.length > 0) {
handlePluginsObject(obj);
} else {
@@ -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) {