fchat-rising/fchat/common.ts

5 lines
223 B
TypeScript
Raw Normal View History

2017-09-02 01:50:31 +00: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, '&');
}