lib/html_formatter.js
function toHtmlEntities(str) {
        str = str || '';
        return str.replace(/./gm, function(s) {
            return "&#" + s.charCodeAt(0) + ";";
        });
    }
function toHtmlEntities(str) {
        str = str || '';
        return str.replace(/./gm, function(s) {
            return "&#" + s.charCodeAt(0) + ";";
        });
    }
function toHtmlEntities ( str ) { str = str || '' ; return str . replace ( / . / gm , function ( s ) { return "&#" + s . charCodeAt ( 0 ) + ";" ; } ) ; }
Convert html tags to html entites
@param str
@returns {XML|string|*|void}
Convert html tags to html entites