From 92c289f4d69d423db40f966d432e6661fd55b230 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 15:28:43 +0100 Subject: [PATCH] don't mess up unicode strings.... --- QvitterPlugin.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 7e6c362..028abff 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -486,7 +486,6 @@ class QvitterPlugin extends Plugin { function onNoticeSimpleStatusArray($notice, &$twitter_status, $scoped) { - // groups $notice_groups = $notice->getGroups(); $group_addressees = false; @@ -528,7 +527,7 @@ class QvitterPlugin extends Plugin { $oembed->title = $twitter_username; } $oembed_html = str_replace('…','...',$oembed_html); // ellipsis is sometimes stored as html in db, for some reason - $oembed_html = substr(trim(strip_tags(html_entity_decode($oembed_html,ENT_QUOTES))),0,250); // sometimes we have html charachters that we want to decode and then strip + $oembed_html = mb_substr(trim(strip_tags(html_entity_decode($oembed_html,ENT_QUOTES))),0,250); // sometimes we have html charachters that we want to decode and then strip $oembed_title = trim(strip_tags(html_entity_decode($oembed->title,ENT_QUOTES))); $oembed_provider = trim(strip_tags(html_entity_decode($oembed->provider,ENT_QUOTES))); $oembed_author_name = trim(strip_tags(html_entity_decode($oembed->author_name,ENT_QUOTES)));