Fixing audio not working on some pages

This commit is contained in:
Alex Yatskov 2016-07-20 09:01:40 -07:00
parent e32f31fa43
commit ab27ef0096

View File

@ -171,9 +171,9 @@ class Client {
api_playAudio(index) {
const definition = this.definitions[index];
let url = `https://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kanji=${definition.expression}`;
let url = `https://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kanji=${encodeURIComponent(definition.expression)}`;
if (definition.reading) {
url += `&kana=${definition.reading}`;
url += `&kana=${encodeURIComponent(definition.reading)}`;
}
for (let key in this.audio) {