]> git.mxchange.org Git - friendica.git/commitdiff
Remove links from search text
authorMichael <heluecht@pirati.ca>
Fri, 22 Sep 2023 19:09:23 +0000 (19:09 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 22 Sep 2023 19:09:23 +0000 (19:09 +0000)
src/Model/Post/Engagement.php

index a23fe01840931d69a10415665b16a140932a718a..d55a09527f11cfbbbd73002c68e3d9b60207e63e 100644 (file)
@@ -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);