feat(Twilio Node): Add ability to make a voice call using TTS (#3467)

* Add ability to make a voice call on Twilio using TTS

*  Small improvement

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
Shaun
2022-06-14 12:41:51 -04:00
committed by GitHub
parent b8e3bcc052
commit eff97e8d67
3 changed files with 109 additions and 4 deletions

View File

@@ -59,3 +59,17 @@ export async function twilioApiRequest(this: IHookFunctions | IExecuteFunctions,
throw new NodeApiError(this.getNode(), error);
}
}
const XML_CHAR_MAP: { [key: string]: string } = {
'<': '&lt;',
'>': '&gt;',
'&': '&amp;',
'"': '&quot;',
"'": '&apos;'
};
export function escapeXml(str: string) {
return str.replace(/[<>&"']/g, function (ch: string) {
return XML_CHAR_MAP[ch];
});
}