You should be able to put v-pre on the parent container to get Vue not to parse it
Curly braces in rendered by Laravel page
Hi everyone, hope someone can help or point me to the right direction to solve this problem.
Problem: in database contents of textarea is stored, it can be any text. Problem appears when the text contains double curly braces, like this
$some_string = "some text <h1>some html</h1> {{ something }}";
Now I want to display this string in the blade template
<div id="app">
<p>{{ $some_string }}</p>
</div>
But I am also using vue and this string is inside vue root component
const app = new Vue({
el: '#app',
});
So after page is rendered by Laravel, vue.js interprets curly braces and tries to display contents inside of them. Some kind of XSS attack.
Is there any way, that I can tell vue to interpret curly braces as they are like plain text, without trying to interpret them as code?
I found similar case at vue forum - https://forum.vuejs.org/t/html-content-with-vue-syntax-makes-my-instance-crash/2998/9 But there is no good solution there.
Please or to participate in this conversation.