I have the following problem, I want to render html inside a template made with bucket from laravel.
I have it in the following way:
<i class="n-icon-help-circled" data-toggle="tooltip" data-placement="right" title="{{ '<p>' . _('Hola') . '</p><p>' . _('Mundo.') . '</p>' }}"></i>
The where _('Hola')
and the _('Mundo.')
are methods that are in an inner class for globalization.
The problem is that I can't get it to render the HTML, what it does is display the text:
'<p>Hola</p><p>Mundo</p>'
And what I need is for it to display the Hello world without the tags.
I've tried this {!! !!}
and this {!!html_entity_decode( '<p>' . _('Hola') . '</p><p>' . _('Mundo.') . '</p>')!!}
and I can't get it to display the text the way I want it to.
Sorry but I don't know much about Laravel. Framework version is 4.2
PS: If I use an echo it shows it correctly. If I remove the html tags and try to do a return \n
it gives me an illegal character error.
In the end I confused 2 important things here, and that was the use of Laravel with Bootstrap. This is not a problem as such for Laravel, I just needed to place
data-html="true"
the<i>
, additionally leave the HTML tags outside of the{{}}
template (I am told it is a good practice) and that's it, in the end it would look like this: