]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/attachmentlist.php
add $config['attachments']['path'] to the config.php.sample
[quix0rs-gnu-social.git] / lib / attachmentlist.php
index 7bd441bf4da237bdc116ee152f26164b8b868bc2..41d03f8e2124b2d3a9762aad2b3963d417d6cdd8 100644 (file)
@@ -82,7 +82,8 @@ class AttachmentList extends Widget
         $atts = new File;
         $att = $atts->getAttachments($this->notice->id);
         if (empty($att)) return 0;
-        $this->out->elementStart('dl', array('id' =>'attachments'));
+        $this->out->elementStart('dl', array('id' =>'attachments',
+                                             'class' => 'entry-content'));
         $this->out->element('dt', null, _('Attachments'));
         $this->out->elementStart('dd');
         $this->out->elementStart('ol', array('class' => 'attachments'));
@@ -249,11 +250,14 @@ class Attachment extends AttachmentListItem
         $this->out->elementStart('div', 'entry-title');
         $this->out->elementStart('a', $this->linkAttr());
         $this->out->element('span', null, $this->linkTitle());
-        $this->showRepresentation();
         $this->out->elementEnd('a');
         $this->out->elementEnd('div');
 
-        if ($this->oembed->author_name || $this->oembed->provider) {
+        $this->out->elementStart('div', 'entry-content');
+        $this->showRepresentation();
+        $this->out->elementEnd('div');
+
+        if (!empty($this->oembed->author_name) || !empty($this->oembed->provider)) {
             $this->out->elementStart('div', array('id' => 'oembed_info', 
                                                   'class' => 'entry-content'));
             if (!empty($this->oembed->author_name)) {
@@ -336,7 +340,12 @@ class Attachment extends AttachmentListItem
             case 'video':
             case 'link':
                 if (!empty($this->oembed->html)) {
-                    $this->out->raw($this->oembed->html);
+                    require_once INSTALLDIR.'/extlib/htmLawed/htmLawed.php';
+                    $config = array(
+                        'safe'=>1,
+                        'elements'=>'*+object+embed');
+                    $this->out->raw(htmLawed($this->oembed->html,$config));
+                    //$this->out->raw($this->oembed->html);
                 }
                 break;