From cb99ed0a01a9f659a1503498063f9b0f8f704cdc Mon Sep 17 00:00:00 2001 From: avidmich Date: Mon, 8 Apr 2013 22:20:50 -0300 Subject: [PATCH] Fixing URL transformation algorithm It didn't work with URL like this: http://host.com/path/to/file.txt#/foo?bar=baz When hash sign is in front of question mark - it only strips the question mark, leaving the hash and breaking the whole app. --- .../src/org/apache/cordova/IceCreamCordovaWebViewClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java b/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java index 2142714a..0ab62029 100644 --- a/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java +++ b/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java @@ -57,7 +57,7 @@ public class IceCreamCordovaWebViewClient extends CordovaWebViewClient { if(niceUrl.contains("?")){ niceUrl = niceUrl.split("\\?")[0]; } - else if(niceUrl.contains("#")) + if(niceUrl.contains("#")) { niceUrl = niceUrl.split("#")[0]; }