Laravel 5: Display HTML with Blade

后端 未结 20 2466
栀梦
栀梦 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:52

    Use {!! $text !!}to display data without escaping it. Just be sure that you don’t do this with data that came from the user and has not been cleaned.

提交回复
热议问题