export const htmlSpecialCharsDecode = (text: string): string => { const map: Record = { '&': '&', '&': '&', ' ': ' ', '<': '<', '>': '>', '"': '"', ''': "'", '’': '’', '‘': '‘', '–': '–', '—': '—', '…': '…', '”': '”', }; return text.replace(/\&[\w\d\#]{2,5}\;/g, (m) => map[m] ?? m); };