From f448ce88abae9a690f9242b88a7550b1a3530ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fco=2E=20Javier=20Mart=C3=ADn=20Carrasco?= Date: Wed, 2 Oct 2013 11:00:46 +0200 Subject: [PATCH] CB-5591 Change window.escape to encodeURIComponent escape is for JS, encodeURIComponent is for URLs. This is a URL. --- src/ios/CDVInAppBrowser.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; }