Perhaps somewhere the function htmlentities is or isn't being called on your text? You can use html_entity_decode to decode it back. Having read most of the responses and your question again though, I would look at the code submitting the AJAX, you most likely need to urlencode the string in javascript before passing it as post data. Most libraries will handle this for you. The function encodeURIComponent should be called on the data if you are assembling it manually.
var postData = encodeURIComponent(key) + '=' + encodeURIComponent(value).replace(/%20/g,'+');
I noticed in one of your comments you were using a jQuery function. jQuery has a helper function called $.param() that will encode a postable string for you, or even easier is just to pass an object to the data parameter of the ajax call (internally it will be passed through $.param()
$.ajax({
method:'POST',
url: '/somefile.php',
data: {
rt: $("textarea#rt").val(),
Type: 1,
//.... more data here
},
success: function(data) {
}
});