From: Mikael Nordfeldth Date: Mon, 24 Feb 2014 17:00:53 +0000 (+0100) Subject: nl2br so we get proper newlining when publishing \r, \n or \r\n X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c6bdafb3d081af001148ea743730d6d927b2b9cd;p=quix0rs-gnu-social.git nl2br so we get proper newlining when publishing \r, \n or \r\n --- diff --git a/lib/util.php b/lib/util.php index 7b75a46784..9f7eac90f9 100644 --- a/lib/util.php +++ b/lib/util.php @@ -832,7 +832,7 @@ function common_find_mentions_raw($text) function common_render_text($text) { - $r = htmlspecialchars($text); + $r = nl2br(htmlspecialchars($text)); $r = preg_replace('/[\x{0}-\x{8}\x{b}-\x{c}\x{e}-\x{19}]/', '', $r); $r = common_replace_urls_callback($r, 'common_linkify');