X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/7718ed271465c8cd292f3b1d916e743db26d4ccd..28b4486013bb2738dfa16f27b73862e287d7f04d:/upload.inc.php
diff --git a/upload.inc.php b/upload.inc.php
index 4eff8a0..afaa047 100644
--- a/upload.inc.php
+++ b/upload.inc.php
@@ -44,7 +44,10 @@ function messagehtml($input)
if (empty($input)) {
return;
}
- $html = htmlspecialchars($input);
- $html = preg_replace('"(?:
){2}"', "
", nl2br($html));
+ $html = preg_replace(
+ ["/\r?\n/", "'(?:
\n?){2}'"],
+ ["
\n", "
"], + htmlspecialchars($input) + ); return "
$html
"; }