mirror of
https://github.com/friendica/friendica
synced 2025-04-25 09:10:11 +00:00
Use the uri-id directly in the bbcode converter
This commit is contained in:
parent
f8ce59b411
commit
cdc18387fd
2 changed files with 26 additions and 21 deletions
|
@ -2640,7 +2640,7 @@ class Item
|
|||
) {
|
||||
self::addRedirToImageTags($item);
|
||||
|
||||
$item['rendered-html'] = BBCode::convert($item['body']);
|
||||
$item['rendered-html'] = BBCode::convert($item['body'], true, BBCode::INTERNAL, false, $item['uri-id']);
|
||||
$item['rendered-hash'] = hash('md5', BBCode::VERSION . '::' . $body);
|
||||
|
||||
$hook_data = ['item' => $item, 'rendered-html' => $item['rendered-html'], 'rendered-hash' => $item['rendered-hash']];
|
||||
|
@ -2755,7 +2755,6 @@ class Item
|
|||
}
|
||||
$attachments = Post\Media::splitAttachments($item['uri-id'], $item['guid'] ?? '', $shared_links);
|
||||
$item['body'] = self::replaceVisualAttachments($attachments, $item['body'] ?? '');
|
||||
$item['body'] = Post\Link::insertFromBody($item['uri-id'], $item['body']);
|
||||
|
||||
$item['body'] = preg_replace("/\s*\[attachment .*?\].*?\[\/attachment\]\s*/ism", "\n", $item['body']);
|
||||
self::putInCache($item);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue