If it is saved in DB properly, then you can give a try without htmlentites().
{{ $post->body }}
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I input this code into tinycme using it's code snippet plugin:
<meta name="csrf-token" content="{{ csrf_token() }}">
it produces code like this:
<pre>
<code class="language-php"><meta name="csrf-token" content="{{ csrf_token() }}"></code></pre>
that exact code is saved to database In blade template I then print it out using:
{{ htmlentities($post->body) }}
all I get is this:
<pre> <code class="language-php"><meta name="csrf-token" content=""></code></pre> <p> </p>
Where did the curly braces go?
I've fixed it by adding v-pre. Like this:
<span v-pre>{{ $post->body }}</span>
When you use this you're still able to use the VueJS framework.
Please or to participate in this conversation.