Open edika99 opened 8 months ago
This function is not minified propperly, generating a bad js file with incorrect syntax:
const escapeHTML = str => str.replace(/[&<>'"]/g, tag => ({ '&': '&', '<': '<', '>': '>', "'": ''', '"': '"' }[tag]));
generate this invalid js
const escapeHTML=n=>n.replace(/[&<>'"]/g,n=>{"&":"&","<":"<",">":">","'":"'",'"':"""}[n])
giving in the browser this error that compromise the load of the entire page
common.js:1 Uncaught SyntaxError: Unexpected token ':' (at common.js:1:5829)
This function is not minified propperly, generating a bad js file with incorrect syntax:
const escapeHTML = str => str.replace(/[&<>'"]/g, tag => ({ '&': '&', '<': '<', '>': '>', "'": ''', '"': '"' }[tag]));
generate this invalid js
const escapeHTML=n=>n.replace(/[&<>'"]/g,n=>{"&":"&","<":"<",">":">","'":"'",'"':"""}[n])
giving in the browser this error that compromise the load of the entire page
common.js:1 Uncaught SyntaxError: Unexpected token ':' (at common.js:1:5829)