要在 CodeIgniter 做 XSS 的輸入過濾,只要像這樣把輸入的內容做處理就好:

$data=[
  "name"=>$this->input->post("name")
];
$data = $this->security->xss_clean($data);