From: Michael Date: Fri, 22 Sep 2023 19:09:23 +0000 (+0000) Subject: Remove links from search text X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aa429be4d9f634421dacfe16709a31936098e38b;p=friendica.git Remove links from search text --- diff --git a/src/Model/Post/Engagement.php b/src/Model/Post/Engagement.php index a23fe01840..d55a09527f 100644 --- a/src/Model/Post/Engagement.php +++ b/src/Model/Post/Engagement.php @@ -157,6 +157,8 @@ class Engagement $body .= ' ' . $item['title'] . ' ' . $item['content-warning'] . ' ' . $item['body']; + $body = preg_replace("~\[url\=.*\]https?:.*\[\/url\]~", '', $body); + $body = Post\Media::addAttachmentsToBody($item['uri-id'], $body); $text = BBCode::toPlaintext($body, false);