summaryrefslogtreecommitdiffstats
path: root/system/libraries/Trackback.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Trackback.php')
-rw-r--r--system/libraries/Trackback.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php
index 5a45be8dd..9fa4a8edb 100644
--- a/system/libraries/Trackback.php
+++ b/system/libraries/Trackback.php
@@ -18,7 +18,7 @@
*
* @package CodeIgniter
* @author EllisLab Dev Team
- * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/)
+ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
* @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* @link http://codeigniter.com
* @since Version 1.0
@@ -181,7 +181,14 @@ class CI_Trackback {
if ($val !== 'url' && MB_ENABLED === TRUE)
{
- $_POST[$val] = mb_convert_encoding($_POST[$val], $this->charset, $this->data['charset']);
+ if (MB_ENABLED === TRUE)
+ {
+ $_POST[$val] = mb_convert_encoding($_POST[$val], $this->charset, $this->data['charset']);
+ }
+ elseif (ICONV_ENABLED === TRUE)
+ {
+ $_POST[$val] = @iconv($this->data['charset'], $this->charset.'//IGNORE', $_POST[$val]);
+ }
}
$_POST[$val] = ($val !== 'url') ? $this->convert_xml(strip_tags($_POST[$val])) : strip_tags($_POST[$val]);