rainlab/builder-plugin

Code editor outputs with quotes

Closed this issue · 1 comments

Hello, I'm using the Code Editor form for input using this plugin. When I try and get the output of the code I input into the form it comes out with quotes around it, so it renders at text instead of actual code. Does anyone know how to pull just the code?

I have this entered into the code editor:

<h1>
    <span class="project-title">Spotify</span>
    <span class="project-title">Passport</span>
</h1>

This is what I have on my frontend to render it(the field is project_title):
{% if record %}
{{ record.project_title }}
{% else %}
{{ notFoundMessage }}
{% endif %}

And it renders as:

"
<h1>
    <span class="project-title">Spotify</span>
    <span class="project-title">Passport</span>
</h1>
"

@jcbbuller You need to use the | raw filter to prevent Twig from escaping the output: {{ record.project_title | raw }}