LUCASTUCIOUS
2024-01-20 c11395e7bcd75eef37b4f4e9c67dc9c6f912c0b7
1
2
3
4
5
6
7
8
export const escapeHTML = (unsafe: string) => {
  return unsafe
    .replaceAll("&", "&")
    .replaceAll("<", "&lt;")
    .replaceAll(">", "&gt;")
    .replaceAll('"', "&quot;")
    .replaceAll("'", "&#039;")
}