Hi.
I’m sending the following email address to the server via ajax: b@b.com
var request = $.ajax({
url : varUrl,
data : {email: $('#email').val()},
type : 'GET',
dataType : 'json',
cache : false,
});
On the server, it is received in $_SERVER[‘REQUEST_URI’] as: b%40b.com
I tried to extract it with: Yii::app()->request->getParam() and urldecode(), but both return: "b& #8212;b.com" (remove space).
This happens when the ajax uses GET or POST.
Also note that "& #8212;" is not the html code for @. It is the html code for a dash (-).
Even if I bypass ajax and just test it on the server, I get the same result:
$c = 'b%40b.com';
$d = urldecode($c); // debugger shows it as "b& #8212;b.com"
or
$a = '@' // debugger shows "& #8212;"
Any ideas?