Here is my javascript jquery ajax function to send data. Here i append my data with url to send it to server.
url = "/login/auth/";
$.ajax({
dataType: "json",
url: url+encodeURIComponent("a+b+2"),
success: function (data, textStatus, jqXHR) {
if (data.login === false)
{
alert("Invalid Password");
} else {
$('.login').hide();
$("body").append(data.html);
}
}
});
In PHP
if (isset($_GET['r']))
{
echo 'r='.$_GET['r'];
return explode('/',rtrim($_GET['r'], '/'));
}
PHP decoding it as login/auth/a b 2
?r=in your URL?login/auth/%7B%22pwd%22%3A%22a%2Bb%2B2%22%7Dshould not result inlogin/auth/a b 2, even with double decoding. Are you sure you test the right url and you're not getting a page from cache?