]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Full-content oEmbed html doesn't take up all space (and renders properly)
authorMikael Nordfeldth <mmn@hethane.se>
Thu, 17 Mar 2016 11:58:40 +0000 (12:58 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Thu, 17 Mar 2016 11:58:40 +0000 (12:58 +0100)
plugins/Oembed/OembedPlugin.php

index 65d71f39c8745b18b5b3fecdfc0c24bd07091cc2..4497728c4cefa5079401dc134bd9e11f6a4dbaec 100644 (file)
@@ -248,7 +248,7 @@ class OembedPlugin extends Plugin
             $out->element('div', ['class'=>'error'], $e->getMessage());
         }
         $out->elementStart('h5', ['class'=>'oembed-title']);
-        $out->element('a', ['href'=>$file->getUrl()], $oembed->title);
+        $out->element('a', ['href'=>$file->getUrl()], common_strip_html($oembed->title));
         $out->elementEnd('h5');
         $out->elementStart('div', ['class'=>'oembed-source']);
         if (!empty($oembed->author_name)) {
@@ -279,7 +279,9 @@ class OembedPlugin extends Plugin
         }
         $out->elementEnd('div');
         $out->elementEnd('header');
-        $out->element('div', ['class'=>'oembed-item-body'], common_purify($oembed->html));
+        $out->elementStart('div', ['class'=>'oembed-html']);
+        $out->raw(common_purify($oembed->html));
+        $out->elementEnd('div');
         $out->elementStart('footer');
         $out->elementEnd('footer');
         $out->elementEnd('article');