I have a user-input text displayed on one of the pages. I want to allow new lines, though. How do I display the text, so it is escaped AND allows new lines?
I used nl2br()
and Blade's tripple brackets {{{$text}}}
, however, obviously, the tripple brackets escape <br/>
tags as well.
Is there a way to combine escaping and HTML's new lines using Blade?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…