Render HTML on Laravel blade

0

I have the following problem, I want to render html inside a template made with laravel bucket.

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>

In which _('Hola') and _('Mundo.') are methods that are in an internal class for globalization.

The problem is that I can not get the HTML back to me, what it does is show the text:

'<p>Hola</p><p>Mundo</p>'

And what I need is to show the Hello world without the tags.

I tried to do it with this {!! !!} and with this {!!html_entity_decode( '<p>' . _('Hola') . '</p><p>' . _('Mundo.') . '</p>')!!} and I can not make it show me the text as I want.

Sorry but I do not know much about Laravel. The version of the Framework is 4.2

P.D: If I use an echo, it shows it correctly. If I remove the html tags and try to make a return \n it gives me a character error not allowed.

    
asked by Wilfredo 07.06.2016 в 14:39
source

1 answer

1

In the end I confused 2 important things here, and it was the use of Laravel with Bootstrap. This is not a problem as such of Laravel just needed to put data-html="true" to <i> , additionally leave the HTML tags outside the {{}} of the template (They tell me that it is a good practice) and ready, At the end would look like this:

<i class="n-icon-help-circled" data-html="true" data-toggle="tooltip"  data-placement="right" title="<p>{{_('Hola')}}</p><p>{{_('Mundo.')}}</p> }}"></i>
    
answered by 07.06.2016 / 16:10
source