nl2br helper: convert also raw newlines

This commit is contained in:
Alexander A. Klimov 2016-12-05 13:20:02 +01:00
parent d6d0434a5f
commit 4205eb4cc9
1 changed files with 1 additions and 1 deletions

View File

@ -10,5 +10,5 @@ $this->addHelperFunction('ellipsis', function ($string, $maxLength, $ellipsis =
}); });
$this->addHelperFunction('nl2br', function ($string) { $this->addHelperFunction('nl2br', function ($string) {
return str_replace(array('\r\n', '\r', '\n'), '<br>', $string); return nl2br(str_replace(array('\r\n', '\r', '\n'), '<br>', $string), false);
}); });