From ebf3182ac0275887fc0609be098329dc30865ee2 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 25 Nov 2019 21:14:28 +0100 Subject: [PATCH] upload: replace double line breaks by paragraphs in text input --- upload.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload.inc.php b/upload.inc.php index ed9ee77..4eff8a0 100644 --- a/upload.inc.php +++ b/upload.inc.php @@ -45,6 +45,6 @@ function messagehtml($input) return; } $html = htmlspecialchars($input); - $html = nl2br($html); + $html = preg_replace('"(?:
){2}"', "

\n\n

", nl2br($html)); return "

$html

"; } -- 2.30.0