From 3c7248e222d699e86aecaa1c250288d341e75f95 Mon Sep 17 00:00:00 2001 From: Falcosc Date: Sun, 16 Jun 2024 17:12:52 +0200 Subject: [PATCH] Workarround Microsoft multilingual crash at < and > --- scripts/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/main.js b/scripts/main.js index 51ffb39..90f9959 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -447,6 +447,7 @@ class VoiceMessage { this.utterance.rate = voiceFormData.get('rate'); if(this.utterance?.voice?.name?.includes('Multilingual')) { //avoid Edge Multilingual crash at & this.utterance.text = this.utterance.text.replaceAll('&', andTranslations[this.utterance.voice?.lang] || ' '); + this.utterance.text = this.utterance.text.replace(/[<>]/g,''); } } this.utterance.volume = voiceFormData.get('volume'); //always overwrite volume