php - CodeIgniter xss_clean issue with large amount of html [in firefox] -
i'm receiving next error on console:
<p>severity: 8192</p> <p>message: preg_replace(): /e modifier deprecated, utilize preg_replace_callback instead</p> <p>filename: core/security.php</p> <p>line number: 512</p>
which refers function in core/security line 512:
public function entity_decode($str, $charset='utf-8'){ if (stristr($str, '&') === false) { homecoming $str; } $str = html_entity_decode($str, ent_compat, $charset); $str = preg_replace('~&#x(0*[0-9a-f]{2,5})~ei', 'chr(hexdec("\\1"))', $str); homecoming preg_replace('~&#([0-9]{2,4})~e', 'chr(\\1)', $str); }
this happens because i'm inserting big amount of html (pure html) database.
public function add($data){ $this->security->xss_clean($data); $this->db->insert('covers', $data); homecoming $this->db->insert_id(); }
if remove line $this->security->xss_clean($data);
works perfectly.
a curious thing works on chrome stops working on chrome test on firefox (v. 32.0.1). after testing in firefox , receiving error if go chrome , test 1 time again have same issue in chrome too.
edit: error, , line $this->security->xss_clean($data);
on, info stored in database warning displayed in console.
use error_reporting(e_all & ~e_notice & ~e_warning);
in code suppress error
php html codeigniter google-chrome firefox
No comments:
Post a Comment