M
M
marq2020-03-30 21:13:26
CodeIgniter
marq, 2020-03-30 21:13:26

Code igniter remove styles from string in textarea or input?

Good afternoon, I type in textarea or input such text

<p>aa<span style="background-color:#e74c3c">aaaa</span></p>

and in the output I get how to fix it? <p>aa<span >aaaa</span></p>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
marq, 2020-03-31
@marq

found how to fix the problem in config/config.php Set to FALSE, but how to set to false only for my controller?
$config['global_xss_filtering']=TRUE;

N
nokimaro, 2020-03-30
@nokimaro

These are XSS protection functions
smoke
docs https://codeigniter.com/user_guide/libraries/input...
https://codeigniter.com/user_guide/libraries/secur...
$this->input->post('key', FALSE); // No XSS filter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question