- fix escapeTags() failed in PHP 8.1

This commit is contained in:
Max Pozdeev 2022-01-02 20:02:01 +03:00
parent 1fb8c953e7
commit b6d9114e8e

View file

@ -221,6 +221,9 @@ function url_dir($url, $onlyPath = 1)
function escapeTags($s)
{
if ($s == '') {
return '';
}
$c1 = chr(1);
$c2 = chr(2);
$s = preg_replace("~<b>([\s\S]*?)</b>~i", "${c1}b${c2}\$1${c1}/b${c2}", $s);