I’m sending HTML trough POST and the ‘&’s are messing it up, how can I avoid it? Tried replacing & with \&, didn’t work.
For more info: I’m trying to use email templates in an in-house project and stuff like   is screwing up the POST i’m using to send them from javascript to php.
code below:
emailcontinut = CKEDITOR.instances['emailContinut'].getData();
var parametri = "Trimite="+trimite + "&codc="+codc + "&emailSubiect="+emailsubiect + "&emailContinut="+emailcontinut + "&adact="+adact + "&sid="+Math.random();
xmlhttp_email_actiune.open("POST",url,true);
xmlhttp_email_actiune.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp_email_actiune.setRequestHeader("Content-length", parametri.length);
xmlhttp_email_actiune.setRequestHeader("Connection", "close");
xmlhttp_email_actiune.send(parametri);
when I echo $_POST[’emailContinut’] in the target PHP, it stops at the first ‘&’ in an  
the solution was just
emailcontinut = escape(emailcontinut);
in javascript and then using stripslashes() in php to decode it. thanks.
You just need to use the escape JS function to encode the URL and send the ajax call using encoded URL eg:
JP