Unescape HTML special characters
JavaScript version
const unescape = (str) =>
str
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/�*39;/g, "'")
.replace(/"/g, '"');
TypeScript version
const unescape = (str: string): string =>
str
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/�*39;/g, "'")
.replace(/"/g, '"');