I'm trying to send an object to my server that has keys which contains blanks. For some reason that I don't understand the blanks get converted to underscores at the server. How can I prevent this?
var myObject = {};
myObject['x x'] = 'asdf';
$.post(someUrl, myObject, function (data) {
...
}, 'json');
In my PHP code $_POST is set to this array:
$_POST = [
'x_x' => 'asdf'
]
Why is that and how do I deal with it? Are there any other characters that get converted this way?