diff --git a/src/extensions/scratch3_text2speech/index.js b/src/extensions/scratch3_text2speech/index.js index 493c085d0..c1dfd9555 100644 --- a/src/extensions/scratch3_text2speech/index.js +++ b/src/extensions/scratch3_text2speech/index.js @@ -472,7 +472,7 @@ class Scratch3Text2SpeechBlocks { let path = `${SERVER_HOST}/synth`; path += `?locale=${this.localeToPolly(this.getCurrentLanguage())}`; path += `&gender=${gender}`; - path += `&text=${encodeURI(words.substring(0, 128))}`; + path += `&text=${encodeURIComponent(words.substring(0, 128))}`; // Perform HTTP request to get audio file return new Promise(resolve => {