I send some test through jquery's ajax request. This text contains some special characters like "<" , ">" , "&", which stand for <, >, and &.
$.ajax({
type: "POST",
url: "page.php",
data: "content="+txt });
Unfortunately, the string is not well transmitted. Only the beginning is transmitted, and it is cut at the first special character.
For instance, if I send "blablabla<grogrogro", the server only receive "blablabla"
How can I fix that?
PS: The special characters actually end with a ";", I did not put it because otherwise they are not well displayed.
& represents another variable in your data query string. So, you should send it by using a JavaScript object like so:
$.ajax({
type: "POST",
url: "page.php",
data: {
"content": txt
}
});