Fix newline rendering

This commit is contained in:
ruan 2021-01-16 13:31:46 +02:00
parent 138f146c1f
commit ad425339b5

View File

@ -319,8 +319,8 @@ class Page {
$text = preg_replace("/(?i)(\x{00a7}|&)[0-9A-FK-OR]/u", "", $text);
}
$text = htmlspecialchars($text, ENT_QUOTES);
if (strstr($text, "\n")) {
$text = preg_replace("/\n/", "<br>", $text);
if (strstr($text, "\\n")) {
$text = preg_replace("/\\\\n/", "<br>", $text);
}
return $text;
}