That's not jQuery's fault. You escaped the text body twice:
var text_body = encodeURIComponent(CKEDITOR.instances.text_body.getData());
Note jQuery already does encodeURIComponent
to anything you pass in as data
. The solution is just to get rid of it.
function saveEmailData(){
var text_body = CKEDITOR.instances.text_body.getData();
$.ajax({
url: 'al_ajax.php',
cache: false,
data: {area: text_body, use: 'savemaildata'},
type: 'POST',
success: function(result){
alert(result);
},
error: function(result){
alert('Error');
},
});
}