I seem to be having a lot of issues with ckeditor in chrome, it works fine in firefox but when I post data in chrome it breaks when there is an html entity...
for example when I type
this is a scentence with the word it's and it will break
it will only post up to
this is a scentence with the word it
obviously causing a big headache for me currently...
this is the javacript for me posting:
$("#admin-pnews").submit(function() { $('#admin-pnews-result').html('Saving..'); CKEDITOR.instances.pnews.updateElement(); $.ajax({ type: "POST", url: website+'/lib/pnews-lib.php', data: $('#admin-pnews').serialize(), success: function(result) { if(result == 0){ $('#admin-pnews-result').html('Username Left Blank'); } else if(result == 1){ $('#admin-pnews-result').html('Title Left Blank'); } else if(result == 2){ $('#admin-pnews-result').html('Date Left Blank'); } else if(result == 3){ $('#admin-pnews-result').html('Body Left Blank'); } else if(result == 4){ $('#admin-pnews-result').html('Post Successful! Form Cleared.'); $('#admin-pnews')[0].reset(); CKEDITOR.instances.pnews.setData(''); } else { $('#admin-pnews-result').html('Something went wrong'); } }, error: function(jqXHR, textStatus, errorThrown) { alert(JSON.stringify(jqXHR)); } });
and this is the php where I handle the data:
$body = html_entity_decode($news['pnews']);