Laravel 5: Display HTML with Blade

后端 未结 20 2418
栀梦
栀梦 2020-11-22 16:21

I have a string returned to one of my views, like this:

$text = \'

Lorem ipsum dolor

20条回答
  •  独厮守ぢ
    2020-11-22 16:42

    Try this. It worked for me.

    {{ html_entity_decode($text) }}
    

    In Laravel Blade template, {{ }} wil escape html. If you want to display html from controller in view, decode html from string.

提交回复
热议问题