You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/04/16 21:46:33 UTC

android commit: Fixing URL transformation algorithm

Updated Branches:
  refs/heads/master 4864d5296 -> cb99ed0a0


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.


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

Branch: refs/heads/master
Commit: cb99ed0a01a9f659a1503498063f9b0f8f704cdc
Parents: 4864d52
Author: avidmich <al...@vidmich.com>
Authored: Mon Apr 8 22:20:50 2013 -0300
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Apr 16 15:45:32 2013 -0400

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


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/cb99ed0a/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 2142714..0ab6202 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];
             }