Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
escape: function(text){
if (!text){
return '';
}
// apply generic escape function
text = _ejs.escapeXML(text);
// linebreaks
text = text.replace(/\n/g, '<br>');
return text;
}
});
exports.htmlString = function (str) {
return str ? escapeXML(str).replace(/\n/g, '<br>') : str
}