summaryrefslogtreecommitdiff
path: root/modules/tag
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-03-27 11:31:34 -0700
committerBharat Mediratta <bharat@menalto.com>2011-03-27 11:31:34 -0700
commitfa6f233603267505c216abc4f12663d245cd23e7 (patch)
treee680466352037a794166c639e86f82186cbe7c97 /modules/tag
parent65825c572a0db24036c855de01714c613a979550 (diff)
Centralize our encoding code into a new helpers and use
mb_convert_encoding if possible. Build on the work in c791ae96d5bb28f39b26a0e556e10e636f97436c by momo-i. Fixes #1660.
Diffstat (limited to 'modules/tag')
-rw-r--r--modules/tag/helpers/tag_event.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index cd79f734..efef916f 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -36,10 +36,7 @@ class tag_event_Core {
$tag = str_replace("\0", "", $tag);
foreach (explode(",", $tag) as $word) {
$word = trim($word);
- if (function_exists("mb_detect_encoding") &&
- mb_detect_encoding($word, "ISO-8859-1, UTF-8") != "UTF-8") {
- $word = utf8_encode($word);
- }
+ $word = encoding::convert_to_utf8($word);
$tags[$word] = 1;
}
}