diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 96a6102..7e6c362 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -528,15 +528,17 @@ 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 = trim(strip_tags(html_entity_decode($oembed_html))); // sometimes we have html charachters that we want to decode and then strip - $oembed_title = trim(strip_tags(html_entity_decode($oembed->title))); + $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_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))); $attachment_url_to_id[$enclosure_o->url]['oembed'] = array( 'type'=> $oembed->type, - 'provider'=> $oembed->provider, + 'provider'=> $oembed_provider, 'provider_url'=> $oembed->provider_url, 'oembedHTML'=> $oembed_html, 'title'=> $oembed_title, - 'author_name'=> $oembed->author_name, + 'author_name'=> $oembed_author_name, 'author_url'=> $oembed->author_url ); } else {