Rendering ejs template

ejs, node.js

Solution

For outputting escaped html, you do the following:

<%= code %>

To output unescaped html, you would use the following

<%- code %>

Problem

I have following code in nodejs (I read temp.ejs file and get content as ejsHtml as string): ``` var html = EJS.render(ejsHtml, { A: '<div>smth</div>' } ); ``` And in temp.ejs: ``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> </head> <body> <%= A %> </body> </html> ``` Output: ``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> </head> <body> &lt;div&gt; smth &lt;/div&gt; </body> </html> ``` Please tell me how to get Html and not that

Original source