From 5f9fb1f14f47b666f8716ca0b2e095fa6242886e Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 27 May 2019 12:02:12 -0400 Subject: [PATCH] Simplify BBCode::toPlaintext - Keep white spaces after tags --- 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 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); } -- 2.39.5