]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
Merge pull request #12491 from MarekBenjamin/patch-1
[friendica.git] / mod / item.php
index 924059df815b4f00637a35e59c22e3328c7475fd..e23e9fb4c4fa86814c4c4b367434c5de5ec49d6e 100644 (file)
@@ -239,6 +239,8 @@ function item_post(App $a) {
 
                $att_bbcode = "\n" . PageInfo::getFooterFromData($attachment);
                $body .= $att_bbcode;
+       } elseif (preg_match("/\[attachment\](.*?)\[\/attachment\]/ism", $body, $matches)) {
+               $body = preg_replace("/\[attachment].*?\[\/attachment\]/ism", PageInfo::getFooterFromUrl($matches[1]), $body);
        }
 
        // Convert links with empty descriptions to links without an explicit description