cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [02/14] git commit: CB-5591 Change window.escape to encodeURIComponent
Date Thu, 02 Jan 2014 18:08:29 GMT
CB-5591 Change window.escape to encodeURIComponent

escape is for JS, encodeURIComponent is for URLs. This is a URL.


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

Branch: refs/heads/master
Commit: f448ce88abae9a690f9242b88a7550b1a3530ffb
Parents: ea23915
Author: Fco. Javier Martín Carrasco <javray@gmail.com>
Authored: Wed Oct 2 11:00:46 2013 +0200
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri Dec 6 09:14:15 2013 -0500

----------------------------------------------------------------------
 src/ios/CDVInAppBrowser.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/f448ce88/src/ios/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m
index 4ef051f..3f158ca 100644
--- a/src/ios/CDVInAppBrowser.m
+++ b/src/ios/CDVInAppBrowser.m
@@ -235,7 +235,7 @@
     NSString* jsWrapper = nil;
 
     if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"])
{
-        jsWrapper = [NSString stringWithFormat:@"_cdvIframeBridge.src='gap-iab://%@/'+window.escape(JSON.stringify([eval(%%@)]));",
command.callbackId];
+        jsWrapper = [NSString stringWithFormat:@"_cdvIframeBridge.src='gap-iab://%@/'+encodeURIComponent(JSON.stringify([eval(%%@)]));",
command.callbackId];
     }
     [self injectDeferredObject:[command argumentAtIndex:0] withWrapper:jsWrapper];
 }


Mime
View raw message