I have the following code in nodejs (I read the temp.ejs file and get the contents as ejsHtml as a 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>
Conclusion:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
</head>
<body>
<div> smth </div>
</body>
</html>
Please tell me how to get Html, not
source
share