0

I have JSON files that contains some raw html (with tags) that I need to render onto a page. I read the file I need in Node then pass it to the handlebars template. However when I display the raw html using {{this.raw_html}}, I see actual tags (<p></p>) on the page.

How can I render this correctly?

1 Answer 1

4

To render raw HTML in Handlebars, use triple brackets, ie:

{{{variable}}}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.