(str: string)
| 7 | }; |
| 8 | |
| 9 | export function escapeHtml(str: string): string { |
| 10 | if (!str) return ''; |
| 11 | return String(str).replace(/[&<>"']/g, (char) => HTML_ESCAPE_MAP[char] || char); |
| 12 | } |
| 13 | |
| 14 | export function sanitizeUrl(url: string): string { |
| 15 | if (!url) return ''; |
no outgoing calls
no test coverage detected