Hello. I just can not understand what the problem is.
There is a div which contains the text of the description of the news.
<div id="my_html_content">Содержимое с <b>HTML</b> тегами и всем что может быть еще.</div> Screwed this divym tinymce with the ability to inline the output of the editor and save. In general, when saved in the editor, save_onsavecallback is called, which in turn calls my function ajax_save_news in which the argument is the contents of the diva obtained with
tinymce.get("my_html_content").getContent() Actually the function that makes the promise
function ajax_save_news(news_content) { $.ajax({ url:"ajax_action.php?action=ajax_save_news&news_id="+NEWS_ID, type:"post", dataType:"html", data:"news_content=" + news_content, success:function(return_data) { alert(return_data); } }); } Everything would be fine, only here as a result I cut html. In the console, the data is still whole, but with php already broken content.
I can not understand what the problem is. It turns out that stumbles on unbreakable spaces and the like in the content. I tried all sorts of manipulations with the functions of screening, but apparently not.
UPD: An example of the text that is sent from the diva (this is already with the html content that is in the editor in the admin)
<p>Премьер-министр Израиля Биньямин Нетаньяху <br />поручил МИД подготовить выход страны из ЮНЕСКО. <br />Как сообщает Haaretz со ссылкой на пресс-службу <br />премьера, Нетаньяху приветствовал решение США <br />выйти из ЮНЕСКО, отметив, что Вашингтон поступил <br />смело.</p> And when I receive in $ _POST, I only
Премьер-министр Израиля Биньямин Нетаньяху поручил МИД подготовить выход страны из ЮНЕСКО. Как сообщает