Search posts, tags, users, and pages
Stef Rouschop
Laravel Developer at Code Runway B.V.
The problem I recently got a question from a client about disappearing line breaks. It was a valid question since the text came from a textarea input that was echoed out on a page. The type of content was really simple and had no need for markup, so ...
Mark Snape
I try to use CSS, but failing that, my preferred pattern is
{!! nl2br(e($description)) !!}
the e() function escapes the content, then you convert the newlines and finally, safely echo the raw content
Said Bakr
Freelance web developer.
The blade component implementation is new for me. I have used to Blade Service Provider in Laravel 5.4. What is the version of Laravel that started such theses components?
I’m not sure, but I think they were introduced in Laravel 7.
Mark Snape
I try to use CSS, but failing that, my preferred pattern is
{!! nl2br(e($description)) !!}the e() function escapes the content, then you convert the newlines and finally, safely echo the raw content