CB-5591 Change window.escape to encodeURIComponent

escape is for JS, encodeURIComponent is for URLs. This is a URL.
This commit is contained in:
Fco. Javier Martín Carrasco
2013-10-02 11:00:46 +02:00
committed by Andrew Grieve
parent ea239151d2
commit f448ce88ab
+1 -1
View File
@@ -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];
}