diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 270ea3e..1be1692 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -517,10 +517,13 @@ class QvitterPlugin extends Plugin { if(array_key_exists('Oembed', StatusNet::getActivePlugins())) { $oembed = File_oembed::getKV('file_id',$attachment->id); if($oembed instanceof File_oembed) { + $oembed_html = str_replace('<!--//-->','',$oembed->html); // trash left of wordpress' javascript after htmLawed removed the tags + $oembed_html = str_replace('…','...',$oembed_html); // ellipsis is sometimes stored as html in db, for some reason + $oembed_html = strip_tags($oembed_html); $attachment_url_to_id[$enclosure_o->url]['oembed'] = array( 'provider'=> $oembed->provider, 'provider_url'=> $oembed->provider_url, - 'oembedHTML'=> strip_tags($oembed->html), + 'oembedHTML'=> $oembed_html, 'title'=> $oembed->title, 'author_url'=> $oembed->author_url ); diff --git a/js/dom-functions.js b/js/dom-functions.js index 1b29f6c..8cb8a70 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -2182,20 +2182,14 @@ function buildAttachmentHTML(attachments){ var oembedBody = ''; - try { - var oembedStrippedHTML = $.trim($('