Reputation: 397
I would like to remove the stripslash "\"
character from my database search result.
Instead of using {{stripslashes($output->var)}}
, which add a PHP function on every output in blade, can I do it GLOBALLY in the BladeCompiler file
?
I want to apply this change in every output {{ }}
in my Laravel site, any suggestion? I tried to modify the Bladecompiler
file compileRegularEchos
function, seems not working, please advice
Upvotes: 0
Views: 1091
Reputation: 186
I'm assuming you're using Laravel 5 because Blade templating defaults to escaping now. If you want to echo something without escaping you can use this syntax:
{!! $output->var !!}
For more info you can check the Blade docs
Upvotes: 2