In codeigniter the $this->input->post()
(with xss_clean=true
)
gives this output
[removed]alert('Hello')[removed]
for this input string
<script>alert('Hello')</script>
I want the output without containing [removed]
, i.e. alert('Hello')
Finally i ended up editing system/core/security.php
file.
From
$str = preg_replace("#<(/*)(script|xss)(.*?)\>#si", '[removed]', $str);
To
$str = preg_replace("#<(/*)(script|xss)(.*?)\>#si", '', $str);
It does the job.
I'm just asking if there is any alternative way to do this without changing system files ?
Additionally ,
Should i use codeigniter
's xss_clean
function ?