summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-07-10 07:37:20 -0700
committerBharat Mediratta <bharat@menalto.com>2009-07-10 07:37:20 -0700
commitde39dcbce67f934085621ac7838980d42bfd1bb9 (patch)
tree78645b89ddb657f122f283f3bbf0924ad7258aa7 /modules/tag/helpers
parentab5695ca575da4d5842d4c94924c3ee5c4a6faad (diff)
parenta059eff25d3e4975f39ad04181039d4544e47059 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/tag_event.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index 946326c0..7a170bf8 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -34,10 +34,13 @@ class tag_event_Core {
if (!empty($iptc["2#025"])) {
foreach($iptc["2#025"] as $tag) {
$tag = str_replace("\0", "", $tag);
- if (function_exists("mb_detect_encoding") && mb_detect_encoding($tag) != "UTF-8") {
- $tag = utf8_encode($tag);
+ foreach (preg_split("/[,;]/", $tag) as $word) {
+ $word = preg_replace('/\s+/', '.', trim($word));
+ if (function_exists("mb_detect_encoding") && mb_detect_encoding($word) != "UTF-8") {
+ $word = utf8_encode($word);
+ }
+ $tags[$word] = 1;
}
- $tags[$tag] = 1;
}
}
}