Bertho Joris
Bertho Joris

Reputation: 1601

tinyMCE + Codeigniter

My problem now is that when I make arrangements to CodeIgniter :

$config['global_xss_filtering'] = TRUE;

This setting remove tags that I made in the TinyMCE editor

<img style="....">

As of now I can only do the setting

$config['global_xss_filtering'] = FALSE;

Then I use xss_filter to field I want. It certainly makes me difficult if there are many forms that require validation this. Is there no other way to be able to recognize CodeIgniter style tag in TinyMCE?

Upvotes: 1

Views: 2486

Answers (1)

Dino Babu
Dino Babu

Reputation: 5809

You have other option

set xss filtering false

$config['global_xss_filtering'] = FALSE;

then use second param for the input , if u need xss filtering on for specifc field

$name = $this->input->post('name', TRUE); // xss filtering on

if you dont want xss filtering

$tiny_mce = $this->input->post('tiny_mce'); // xss filtering off

or i think you can do it in reverse

$config['global_xss_filtering'] = TRUE;

and

$tiny_mce = $this->input->post('tiny_mce', FALSE); // xss filtering off

Upvotes: 4

Related Questions