]> git.mxchange.org Git - friendica.git/commitdiff
Fix regexp for search text generation
authorMichael <heluecht@pirati.ca>
Sat, 13 Jan 2024 19:20:45 +0000 (19:20 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 13 Jan 2024 19:20:45 +0000 (19:20 +0000)
src/Content/Text/BBCode.php

index dc82262c9e2bd6460b27c2f5a2f1ece17bdc4667..8396a95cf8debdff3b5a7bc131b1d280c303d9bb 100644 (file)
@@ -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