I have a url encoded string i'm sending to php via the jQuery AJAX API that appears to be getting automatically decoded and passed to the server.
Ajax Call:
var requestXML = '<searchString>red%20ford%5BimpoundState%3Ain%5D</searchString>';
$.ajax({
data: "query=" + requestXML,
success: function(response)
{
//alerts <searchString>red%20ford%5BimpoundState%3Ain%5D</searchString>
alert(requestXML);
}
});
Inspecting the request in the chrome dev tools shows its being decoded
I'm a bit lost here, I read a bit about jQuery processing data, but i turned that off via {processData: false} but i got no results.
-Thanks for any help!
UPDATE:
My backend is currently set up to parse xml with url encoded values.
Like: <searchString>red%20ford%5BimpoundState%3Ain%5D</searchString>
When i pass data: {query: requestXML} i get...
This:%3CsearchString%3Ered%20ford%5BimpoundState%3Ain%5D%3C%2searchString%3E (url encoded xml).
The real issue is when i'm generating this XML I encode the values, but jQuery seems to decode them in the request.