diff options
author | Andrey Andreev <narf@devilix.net> | 2014-02-11 21:48:45 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-02-11 21:48:45 +0100 |
commit | be1496d1a8618ef186047468009c7e3e0640183b (patch) | |
tree | 92bce7844ffa06bcae2626dcbacda11846f2d5b4 /system/libraries/Trackback.php | |
parent | f6ead61e8930574b0e7e8cfad6b4878bb169d61a (diff) |
Utf8/iconv/mbstring-related changes
Diffstat (limited to 'system/libraries/Trackback.php')
-rw-r--r-- | system/libraries/Trackback.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index 7bcb2aa21..9fa4a8edb 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -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]); |