0

I'm creating a node app with mongodb. I'm using TinyMCE in textareas for input. When I save it to the database and want to show it somewhere on a page, I see the HTML Code (<p>This is a paragraph</p>) instead of the actual rendered HTML. When I console.log() the item from the ejs file I get this:

<p>Hello</p>
<p>I was here:</p>
<p>Link</p>

But when I look into the source code of the page I see this:

&lt;p&gt;I was here:&lt;/p&gt;
&lt;p&gt;Link&lt;/p&gt;

Any ideas?

theliadir
  • 37
  • 6

1 Answers1

0

So here is the solution:

In ejs there is the <%- for unescaped values, which I forgot. https://ejs.co/#docs

theliadir
  • 37
  • 6