From 98de6ad4648ce3e0b5e7f5078293d4a078ff796a Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 13 Jan 2024 19:20:45 +0000 Subject: [PATCH] Fix regexp for search text generation --- src/Content/Text/BBCode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index dc82262c9e..8396a95cf8 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