Blade: escaping text and allowing new lines
Solution 1:
You can do the escaping first, using e()
and then apply nl2br()
:
{{ nl2br(e($text)) }}
e()
is the function Blade uses when compiling triple brackets
Solution 2:
You can use this
{!! nl2br(e($text)) !!}