Welcome Guest, Not a member yet? Register   Sign In
"Disallowed Key Characters" for HTML content - even using $_POST?!
#9

[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: "&lt;?php echo base_url();?&gt;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?


Messages In This Thread
"Disallowed Key Characters" for HTML content - even using $_POST?! - by El Forum - 11-28-2009, 05:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB