How to prevent XSS attacks when laravel uses {!!content!!}?
習慣沉默2017-05-16 16:48:38
0
1
607
Generally use {{$article->title}}, But sometimes there is a format, so you need this: {!!$article->body !!}, But this will lead to xss attacks. How to deal with it to prevent xss attacks?
It is recommended to use Purifier to filter, and you can configure filtering rules.
How to use