0
GGGiovanny Gongora
Escapes a string for use in HTML.
0 Comments
const escapeHTML = (str: string) => str.replace( /[&<>'"]/g, tag => ({ '&': '&', '<': '<', '>': '>', "'": ''', '"': '"' }[tag] || tag) );