Escapes HTML entities to make a string HTML safe
export const HTMLSafe = function (str: string): string { return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");}; Copy
export const HTMLSafe = function (str: string): string { return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");};
The string to escape
A new string with HTML entities escaped
Escapes HTML entities to make a string HTML safe
Source