From e6270bc46d4f3cf3722b9c0ec644aafbff44f975 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 6 Dec 2020 08:57:06 -0500 Subject: [PATCH] Enable back references in reg exp in BBCode::convert - Bump BBCode version --- src/Content/Text/BBCode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 32eb35f76c..73503cece8 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -50,7 +50,7 @@ use Friendica\Util\XML; class BBCode { // Update this value to the current date whenever changes are made to BBCode::convert - const VERSION = '2020-12-03'; + const VERSION = '2020-12-06'; const INTERNAL = 0; const API = 2; @@ -1852,7 +1852,7 @@ class BBCode }); // Escaped noparse, nobb, pre // Remove escaping tags and replace new lines that remain - $text = preg_replace_callback("/\[(noparse|nobb)\](.*?)\[\/\1\]/ism", function ($match) { + $text = preg_replace_callback('/\[(noparse|nobb)](.*?)\[\/\1]/ism', function ($match) { return str_replace("\n", "
", $match[2]); }, $text);