From: Hypolite Petovan Date: Mon, 27 May 2019 16:02:12 +0000 (-0400) Subject: Simplify BBCode::toPlaintext X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5f9fb1f14f47b666f8716ca0b2e095fa6242886e;p=friendica.git Simplify BBCode::toPlaintext - Keep white spaces after tags --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index e417b38a46..c4735b9e93 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -355,7 +355,7 @@ class BBCode extends BaseObject */ public static function toPlaintext($text, $keep_urls = true) { - $naked_text = preg_replace('/\[(.+?)\]\s*/','', $text); + $naked_text = preg_replace('/\[.+?\]/','', $text); if (!$keep_urls) { $naked_text = preg_replace('#https?\://[^\s<]+[^\s\.\)]#i', '', $naked_text); }