jeudi 24 décembre 2015

xss with laravel 5.1

i am using laravel 5.1

i use this code to save posts to db

 Auth::User()->posts()->save(Blog::create($request->all()));

and when i display post with this code some text and image i want to clean javascript and danger code !

<p>this is text</p>

<p>&nbsp;</p>

<p><img alt="" src="link" style="height:227px; width:342px" /></p>

<script>
alert("this is js");
</script>

{!! $post->content !!}

this is result

when i use

{{ $post->content }}

this is result

i want display images and prevent danger code any solutions



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire