Codeigniter - 删除特定字段上的 xss_clean

Sar*_*nan 2 php xss codeigniter

我已经配置了config.php

$config['global_xss_filtering'] = TRUE;
Run Code Online (Sandbox Code Playgroud)

但我需要禁用特定post参数的 xss_clean 。无论如何,是否要为此全局设置添加例外。这也将减少我提供$data = $this->security->xss_clean($data);除我不需要的方法之外的所有方法的空间和时间。

小智 6

请用

    $this->input->post('name',false);
Run Code Online (Sandbox Code Playgroud)

第二个参数接受是否执行xss_clean