在laravel 5.3中,有时我使用它:{!! ... !!}
,有时我会使用它:{{ ... }}
当我使用它时,它很顺利
我想问一下,两者有什么区别?
答案 0 :(得分:4)
来自Laravel 5.3 doc
Displaying Unescaped Data
By default, Blade {{ }} statements are automatically sent through PHP's htmlentities function to prevent XSS attacks. If you do not want your data to be escaped, you may use the following syntax:
Hello, {!! $name !!}.