let html2Escape = (strText) => { return strText.replace(/[<>&"]/g, function(c) { return { '<': '<', '>': '>', '&': '&', '"': '"' } [c]; }); } export default { html2Escape }