diff --git a/htdocs/application/models/pastes.php b/htdocs/application/models/pastes.php index 434e91a..9f8bdd3 100644 --- a/htdocs/application/models/pastes.php +++ b/htdocs/application/models/pastes.php @@ -19,6 +19,7 @@ * - delete_paste() * - random_paste() * - _format_diff() + * - _strip_bad_multibyte_chars() * Classes list: * - Pastes extends CI_Model */ @@ -55,7 +56,7 @@ class Pastes extends CI_Model $data['created'] = time(); //this is SO evil… saving the «raw» data with htmlspecialchars :-( (but I have to leave this, because of backwards-compatibility) - $data['raw'] = htmlspecialchars($this->input->post('code')); + $data['raw'] = htmlspecialchars($this->_strip_bad_multibyte_chars($this->input->post('code'))); $data['lang'] = htmlspecialchars($this->input->post('lang')); $data['replyto'] = $this->input->post('reply'); @@ -637,4 +638,27 @@ class Pastes extends CI_Model $text = '