X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FItem.php;h=112c36a9c836bc67b4ff21657552d12d046f6c8a;hb=e5e4d142ceebaaafde10af118df15d67362a0d2f;hp=fa928110539a4a72d86cebafa4b68575c9177f7d;hpb=91cc6d5a94301c92c68d100b0b0bd3056a83c45d;p=friendica.git diff --git a/src/Model/Item.php b/src/Model/Item.php index fa92811053..112c36a9c8 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3016,7 +3016,11 @@ class Item $item['hashtags'] = $tags['hashtags']; $item['mentions'] = $tags['mentions']; - $body = $item['body'] = Post\Media::removeFromEndOfBody($item['body'] ?? ''); + if (!$is_preview) { + $item['body'] = Post\Media::removeFromEndOfBody($item['body'] ?? ''); + } + + $body = $item['body']; $fields = ['uri-id', 'uri', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink', 'network', 'has-media', 'quote-uri-id', 'post-type']; @@ -3026,6 +3030,7 @@ class Item $shared = DI::contentItem()->getSharedPost($item, $fields); if (!empty($shared['post'])) { $shared_item = $shared['post']; + $shared_item['body'] = Post\Media::removeFromEndOfBody($shared_item['body']); $quote_uri_id = $shared['post']['uri-id']; $shared_links[] = strtolower($shared['post']['uri']); $item['body'] = BBCode::removeSharedData($item['body']); @@ -3331,15 +3336,15 @@ class Item } if ($shared) { - $content = str_replace(BBCode::TOP_ANCHOR, '
' . $leading . '
' . BBCode::TOP_ANCHOR, $content); - $content = str_replace(BBCode::BOTTOM_ANCHOR, '
' . $trailing . '
' . BBCode::BOTTOM_ANCHOR, $content); + $content = str_replace(BBCode::TOP_ANCHOR, '
' . $leading . '
' . BBCode::TOP_ANCHOR, $content); + $content = str_replace(BBCode::BOTTOM_ANCHOR, '
' . $trailing . '
' . BBCode::BOTTOM_ANCHOR, $content); } else { if ($leading != '') { - $content = '
' . $leading . '
' . $content; + $content = '
' . $leading . '
' . $content; } if ($trailing != '') { - $content .= '
' . $trailing . '
'; + $content .= '
' . $trailing . '
'; } } @@ -3499,7 +3504,7 @@ class Item } if ($trailing != '') { - $content .= '
' . $trailing . '
'; + $content .= '
' . $trailing . '
'; } DI::profiler()->stopRecording();