From ad425339b50e31752e414c1e144c2682463930ee Mon Sep 17 00:00:00 2001 From: ruan <2369127-ruany@users.noreply.gitlab.com> Date: Sat, 16 Jan 2021 13:31:46 +0200 Subject: [PATCH] Fix newline rendering --- inc/page.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/page.php b/inc/page.php index 6e714ae..1bea6b5 100644 --- a/inc/page.php +++ b/inc/page.php @@ -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/", "
", $text); + if (strstr($text, "\\n")) { + $text = preg_replace("/\\\\n/", "
", $text); } return $text; }