$item['hashtags'] = $tags['hashtags'];
$item['mentions'] = $tags['mentions'];
+ $item['body'] = preg_replace("#\s*\[attachment .*?].*?\[/attachment]\s*#ism", "\n", $item['body']);
+
if (!$is_preview) {
$item['body'] = Post\Media::removeFromEndOfBody($item['body'] ?? '');
}
$attachments = Post\Media::splitAttachments($item['uri-id'], $shared_links, $item['has-media'] ?? false);
$item['body'] = self::replaceVisualAttachments($attachments, $item['body'] ?? '');
- $item['body'] = preg_replace("/\s*\[attachment .*?\].*?\[\/attachment\]\s*/ism", "\n", $item['body']);
-
self::putInCache($item);
$item['body'] = $body;
$s = $item["rendered-html"];
],
]);
}
-
+
/**
* Check if the body contains a link