From: Hypolite Petovan Date: Sun, 6 Dec 2020 13:57:06 +0000 (-0500) Subject: Enable back references in reg exp in BBCode::convert X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e6270bc46d4f3cf3722b9c0ec644aafbff44f975;p=friendica.git Enable back references in reg exp in BBCode::convert - Bump BBCode version --- 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);