Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


node js and handlebars html compiled is escaped


node js and handlebars html compiled is escaped  using -'node.js,handlebars.js,template-engine,html-escape-characters'

Im using handlebars in a node aplication, and I have trouble.

This is the template index.html

{{CONTENT}}


This is the code

var fs = require("fs");
var handlebars = require("handlebars");

var data = {
    CONTENT: "<b>Hello world!</b>"
};

var templateFile = fs.readFileSync('./index.html', 'utf8');
var template = handlebars.compile( templateFile );
var html = template(data);


The problem is that the tags <B> are escaped to &lt;B&gt;

How can I avoid this?
    

asked Sep 18, 2015 by vijaygupta1980
0 votes
15 views



Related Hot Questions



Walkin Jobs Opening



Government Jobs Opening


...