5 lines
223 B
TypeScript
5 lines
223 B
TypeScript
|
const ltRegex = /</gi, gtRegex = />/gi, ampRegex = /&/gi;
|
||
|
|
||
|
export function decodeHTML(this: void | never, str: string): string {
|
||
|
return str.replace(ltRegex, '<').replace(gtRegex, '>').replace(ampRegex, '&');
|
||
|
}
|