Skip to content

Commit

Permalink
Workarround Microsoft multilingual crash at < and >
Browse files Browse the repository at this point in the history
  • Loading branch information
Falcosc committed Jun 16, 2024
1 parent 3bd01de commit 3c7248e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c7248e

Please sign in to comment.