Remove links from search text

This commit is contained in:
Michael 2023-09-22 19:09:23 +00:00
parent a8a9f93e09
commit aa429be4d9

View file

@ -157,6 +157,8 @@ class Engagement
$body .= ' ' . $item['title'] . ' ' . $item['content-warning'] . ' ' . $item['body']; $body .= ' ' . $item['title'] . ' ' . $item['content-warning'] . ' ' . $item['body'];
$body = preg_replace("~\[url\=.*\]https?:.*\[\/url\]~", '', $body);
$body = Post\Media::addAttachmentsToBody($item['uri-id'], $body); $body = Post\Media::addAttachmentsToBody($item['uri-id'], $body);
$text = BBCode::toPlaintext($body, false); $text = BBCode::toPlaintext($body, false);