From d46dd31bb0f490e996cf117f09768003f3123acd Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Wed, 5 Dec 2018 12:35:17 -0500 Subject: [PATCH] Use encodeURIComponent --- src/extensions/scratch3_text2speech/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 => {