0

In Laravel 5, using {{ code }} will escape code and show it as text, but if the code is already encoded say HTML, and is displayed inside the {{ }} it will execute, is there a way for this not to happen?

common sense
  • 3,775
  • 6
  • 22
  • 31
Sean E
  • 1
  • 1
    Possible duplicate of [Laravel 5: Display HTML with Blade](https://stackoverflow.com/questions/29253979/laravel-5-display-html-with-blade) – common sense Jan 07 '18 at 20:38

2 Answers2

0

Use {!! $your_code !!} instead of {{ }}

wahdan
  • 1,208
  • 3
  • 16
  • 26
0

If you do not want your data to be escaped, you may use the following syntax: {!! $text !!} to display html

https://laravel.com/docs/5.5/blade#displaying-data

Joan Nguyen
  • 372
  • 1
  • 5