/** * Escape XML special characters for TwiML and other XML responses. */ export function escapeXml(text: string): string { return text .replace(/&/g, "&") .replace(//g, ">") .replace(/"/g, """) .replace(/'/g, "'"); }