I’m using the BeautyMail package to send email via Laravel 8.83. I’m using:
@if ($pasted_content)
{!! $pasted_content !!}
@else
<a href="{{ $temporary_url }}">{{ $temporary_url }}</a> (This link is valid for 7 days)
@endif
in my blade.php, however the $pasted_content is being converted to the corresponding HTML entities. Is there a way that I can force it to keep the HTML tags?
>Solution :
Blade’s {{
/}}
escape the value and it is expected behavior. To output contents raw, you need to use {!!
/!!}
respectively.
See official docs chapter "Displaying Unescaped Data".