[eluser]Dojjjan[/eluser]
I have the same problem here but i didn't understand how you soloved it?
I use tinyMCE and tinyMCE imagemanager for making posts to a blog and i what to use jquerys ajax function for submiting the form. But i get "Disallowed Key Characters" for the html that tinyMCE produces. It works just fine without the ajaxfunction and i dont what to use the $this->db->escape() function because it messes up the html when it gets displayed on the blog (is there an unescape function that i don know about? im new to codeigniter).
this is the jquery ajaxfunction i use.
Code:
$('#blog_save_btn').click(function(){
var headline = tinyMCE.get('blog_headline').getContent();
var content = tinyMCE.get('blog_content').getContent();
$('#blog_site').html('<br/><center><img src="assets/images/ajax-loader.gif" style="border:0;"/> Laddar poster...</center>');
var data_string = "save=true&blog;_headline="+headline+"&blog;_content="+ content;
$.ajax({
type: "POST",
url: "<?php echo base_url();?>index.php/edit_vidga/blogpost_ajax_save",
dataType: "html",
data: data_string,
cache: false,
success: function(response){
$("#blog_site").html(response);
tinyMCE.get('blog_headline').setContent("");
tinyMCE.get('blog_content').setContent("");
add_handlers();
}
});
$("#make_posts").slideUp("slow");
return false;
});
How did you guys sollove this problem? did you escape the datastring with $this->db->escape()? and if so how did you get the html not to break when the data in the database is displayed on the webpage again?