Enable back references in reg exp in BBCode::convert
- Bump BBCode version
This commit is contained in:
parent
f141f5acf4
commit
e6270bc46d
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ use Friendica\Util\XML;
|
||||||
class BBCode
|
class BBCode
|
||||||
{
|
{
|
||||||
// Update this value to the current date whenever changes are made to BBCode::convert
|
// 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 INTERNAL = 0;
|
||||||
const API = 2;
|
const API = 2;
|
||||||
|
@ -1852,7 +1852,7 @@ class BBCode
|
||||||
}); // Escaped noparse, nobb, pre
|
}); // Escaped noparse, nobb, pre
|
||||||
|
|
||||||
// Remove escaping tags and replace new lines that remain
|
// 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]);
|
return str_replace("\n", "<br>", $match[2]);
|
||||||
}, $text);
|
}, $text);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue