Monday, 22 May 2017

Nodejs express.js - how to render raw html in view

I'm making a personal blog using Node.js and Express. I'm saving every post with two fields, a title and content.

Inside the content I will have a few paragrahs and Images, therefore I was thinking to write html inside and then display that content as raw html, for instance:

My content:

<p>paragrah 1</p>
<p>paragrah 2</p>
<p>paragrah 3</p>
<img src=""></img>

How can I render to look nice and don't show that html tag? Is there any package to render this kind of things?



via Ezequiel Ramiro