Laravel Blade prints html

Asked

Viewed 266 times

0

For some reason when I use {{ }} to interpolate, Blade does not interpret the accents and print the html code on the screen instead of interpreting the code inserir a descrição da imagem aqui

when I use {!! !! }, it prints correctly

inserir a descrição da imagem aqui

However all the code is being used {{ }}, which is the most recommended by documentation of the Laravel, At some point I touched something I shouldn’t have and started to make that mistake, how can I go back to the way I was before.

  • At the top of the layout has <meta charset="utf-8"> ?

  • Yes, <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

  • Recommended when the user is using your site, type screens that show some result on your site, so it depends on where the data comes to use {{}} or {!! !!}... I mean, it’s not that it’s better, it’s when it’s best.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.