]> git.mxchange.org Git - friendica.git/commitdiff
Enable back references in reg exp in BBCode::convert
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 6 Dec 2020 13:57:06 +0000 (08:57 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 6 Dec 2020 13:57:06 +0000 (08:57 -0500)
- Bump BBCode version

src/Content/Text/BBCode.php

index 32eb35f76c12ffa1f2cfa80c9e1f639f91652ee4..73503cece8a8e54e972eaaf200d7c12acfaa910e 100644 (file)
@@ -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", "<br>", $match[2]);
                        }, $text);