From: Michael Date: Sat, 13 Jan 2024 19:20:45 +0000 (+0000) Subject: Fix regexp for search text generation X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2969227ad0071568fa8bb6087ff2673710e9f42e;p=friendica.git Fix regexp for search text generation --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index ac241213d4..51f28773d0 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -283,7 +283,7 @@ class BBCode // Removes mentions, remove links from hashtags $text = preg_replace('/[@!]\[url\=.*?\].*?\[\/url\]/ism', ' ', $text); $text = preg_replace('/[#]\[url\=.*?\](.*?)\[\/url\]/ism', ' #$1 ', $text); - $text = preg_replace('/[@!#]?\[url.*?\[\/url\]/ism', ' ', $text); + $text = preg_replace('/[@!#]+?\[url.*?\[\/url\]/ism', ' ', $text); $text = preg_replace("/\[url=[^\[\]]*\](.*)\[\/url\]/Usi", ' $1 ', $text); // Convert it to plain text