I'm trying to use jQuery post() with a form. one of the texts is returned as HTML by CKeditor and when jQuery posts the text it's deprecated. example Text:
Shirin Ahmed, the newly freed Iranian hostage in the ceasefire deal of Homs last week, says she considers herself the luckiest hostage ever since she was released from captivity by the Liwa al-Tawhid brigade at the Bab al-Salameh border crossing with Turkey two months ago.
Ahmed, 30, was caught equipped with hidden camera and recording devices under her clothes where she was claiming her intention to visit the Shiite shrines in Aleppo province.
the CKEditor generates is as
<p>Shirin Ahmed, the newly freed Iranian hostage in the ceasefire deal of Homs last week, says she considers herself the luckiest hostage ever since she was released from captivity by the Liwa al-Tawhid brigade at the Bab al-Salameh border crossing with Turkey two months ago.</p>
<p> </p>
<p>Ahmed, 30, was caught equipped with hidden camera and recording devices under her clothes where she was claiming her intention to visit the Shiite shrines in Aleppo province.</p>
<p> </p>
when i post the generated text via jQuery .post() I only get the first paragraph.
in Addition if the text contained apostrophe or quotes the posted text is deprecated right at the quote or apostrophe as below:
Syria's conflict began with largely peaceful protests calling for reforms but transformed into an armed uprising and eventually a civil war following a ferocious military crackdown on protesters. More than 150,000 people have died since March 2011, and hundreds of thousands of people have been wounded and displaced by the war.
I Only get Syria
Posted.
any suggestions?
my code is below:
<form id="doAddPost" >
<textarea rows="50" class="ckeditor" id="art_text" required name="art_text" cols="78" placeholder="Art Contents"></textarea>
<input type=submit value=add>
</form>
<script>
$(document).ready(function() {
$("form#doAddPost").on("submit",function(event){
var art_text = $('textarea#art_text').val();
var dataString = 'art_text=' + art_text;
$.post("./Scripts/adminDoAddPost.php", dataString, function (data) {
$('.add_result').html(data).fadeIn(800);
});
return false;
});
});
</script>