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/12/06 15:14:23 UTC
git commit: CB-5591 Change window.escape to encodeURIComponent
Updated Branches:
refs/heads/dev ea239151d -> f448ce88a
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/dev
Commit: f448ce88abae9a690f9242b88a7550b1a3530ffb
Parents: ea23915
Author: Fco. Javier MartÃn Carrasco <ja...@gmail.com>
Authored: Wed Oct 2 11:00:46 2013 +0200
Committer: Andrew Grieve <ag...@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];
}