convert single quotes also (escaped by js later, this avoids double escaping)

This commit is contained in:
Hannes Mannerheim 2016-01-23 00:31:13 +01:00
parent d913d9a3b8
commit 5101cf22b2

View File

@ -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 {