codeigniter 2 y cómo deshabilitar xss para TinyMCE
He buscado en cada sitio, incluyendo stackoverflow en este problema.
Tengo XSS globalmente activado y pocas páginas que uso TinyMCE. En esas páginas me gustaría que la parte TinyMCE no tenga habilitado XSS.
Después de leer alrededor de 40 páginas, todos dicen hacer lo siguiente:
$tiny_mce = $this->input->post('note'); // xss filtering off
o
$tiny_mce = $this->input->post('note', FALSE); // xss filtering off
He probado los dos, aquí está mi modelo:
public function edit($id) {
$tiny_mce = $this->input->post('note'); // xss filtering off
$userId = $this->ion_auth->get_user_id();
$data = array(
'note' => $tiny_mce
,'postedBy' => $userId);
$this->db->where('id', $id);
$this->db->update('company_notes', $data);
}
Alguien sabe por qué no está funcionando? Cualquier ayuda sería genial! Realmente no quiero desactivar el XSS a nivel mundial, así que espero un enfoque "por base".
Editar Acabo de intentar
public function edit($id) {
$this->config->set_item('global_xss_filtering', FALSE);
$tiny_mce = $this->input->post('note'); // xss filtering off
$userId = $this->ion_auth->get_user_id();
$data = array(
'note' => $tiny_mce
,'postedBy' => $userId);
$this->db->where('id', $id);
$this->db->update('company_notes', $data);
}
pero eso tampoco funciona.