Merge pull request #1819 from ericrosenbaum/bugfix/text2speech-encoding

Text to Speech use encodeURIComponent
This commit is contained in:
Eric Rosenbaum 2018-12-05 12:45:33 -05:00 committed by GitHub
commit 1ce88ca8bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 => {