fchat-rising/fchat/common.ts
2017-10-09 23:25:55 +02:00

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, '&');
}