(value: string)
| 49 | // --------------------------------------------------------------------------- |
| 50 | |
| 51 | const escapeHtml = (value: string): string => |
| 52 | value |
| 53 | .replaceAll("&", "&") |
| 54 | .replaceAll("<", "<") |
| 55 | .replaceAll(">", ">") |
| 56 | .replaceAll('"', """) |
| 57 | .replaceAll("'", "'"); |
| 58 | |
| 59 | /** |
| 60 | * Serialize for embedding inside a `<script>` tag. Escapes the characters |