From: Mischa POSLAWSKY Date: Mon, 25 Nov 2019 20:14:28 +0000 (+0100) Subject: upload: replace double line breaks by paragraphs in text input X-Git-Tag: v4.2~5 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/ebf3182ac0275887fc0609be098329dc30865ee2 upload: replace double line breaks by paragraphs in text input --- 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

"; }