Support the ongoing development of Laravel.io →
Input Database
Last updated 2 years ago.
0

@bitlather

Check your database it shouldn't be storing >. It must be & lt ; now for your situation you can use following statement to get the output value without converting into entity.

{{ htmlentities($user->name) }}

Last updated 2 years ago.
0

a shortcut to htmlentities($user->name) is to use the triple curly which routes the echo through the e() function in Laravel. {{{ $user->name }}}

However, did you actually check the database directly? If you are just echoing it out to the browser, then the problem is it is looking at the < and showing the value that means. So you'd need to actually store < in order to get the string to not be interpreted. However, you need to watch things like editing and updating, since can rear its head later if you aren't careful.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

bitlather bitlather Joined 16 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.