At my work we have an Objective C app that loads a URL into a stripped down web browser. From what I understand the browser was written using the webkit framework. This works well until the URL has URL encoded characters (example: %22). When the URL is loaded the URL encoded parameters are corrupted. Below is what I am seeing.
Code Snippet:
Debugging in Xcode shows "RequestURL" to contain the following correct URL parameters:
When the URL is actually loaded, I have a JS popup that displays window.location.href:
It's like it is interpreting the URL encoded characters before the request is actually made. If I take out the URL encoded characters, then things work fine. Also, if I just hit the URL directly in Safari, things work fine. Any ideas? Thanks.
Code Snippet:
NSURL *myUrl = [NSURL URLWithString:myUrlString];
RequestURL = [NSURLRequest requestWithURL: myUrl cachePolicy: NSURLRequestUseProtocolCachePolicy timeoutInterval: 60.0];
[[webBrowser mainFrame] loadRequest : RequestURL];
Debugging in Xcode shows "RequestURL" to contain the following correct URL parameters:
clickHereState=%22testing%22&signalRConnectionId=123
When the URL is actually loaded, I have a JS popup that displays window.location.href:
clickHereState=-2.642388e-229sting2signalRConnectionId=123
It's like it is interpreting the URL encoded characters before the request is actually made. If I take out the URL encoded characters, then things work fine. Also, if I just hit the URL directly in Safari, things work fine. Any ideas? Thanks.