let formatText2Html = function (text) {
var html = text;
if (html) {
html = html.replace(/ /g, " ");
html = html.replace(/\n/g, "<br/>");
}
return html;
};
console.log(formatText2Html("<div>和换\n行 符</div>"))