git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
159ee0f
)
upload: replace double line breaks by paragraphs in text input
author
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 25 Nov 2019 20:14:28 +0000
(21:14 +0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 25 Nov 2019 20:14:17 +0000
(21:14 +0100)
upload.inc.php
patch
|
blob
|
history
diff --git
a/upload.inc.php
b/upload.inc.php
index ed9ee772eccf99f8595f69efd67ee16d57432b1d..4eff8a09cdcc07374e8ac7e6228bf6c797d0c174 100644
(file)
--- 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('"(?:<br />){2}"', "</p>\n\n<p>", nl2br($html)
);
return "<p>$html</p>";
}