const htmlEscapeMap: Record = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', '`': '`' }; export function escapeHtml(value: string): string { return value.replace(/[&<>"'`]/g, (char) => htmlEscapeMap[char]); }