nl2br so we get proper newlining when publishing \r, \n or \r\n

This commit is contained in:
Mikael Nordfeldth 2014-02-24 18:00:53 +01:00
parent 96b0cfe662
commit c6bdafb3d0
1 changed files with 1 additions and 1 deletions

View File

@ -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');