fchat-rising/fchat/common.ts

5 lines
223 B
TypeScript
Raw Normal View History

2017-09-02 03:50:31 +02:00
const ltRegex = /</gi, gtRegex = />/gi, ampRegex = /&/gi;
export function decodeHTML(this: void | never, str: string): string {
return str.replace(ltRegex, '<').replace(gtRegex, '>').replace(ampRegex, '&');
}