scottgigante / korean-support

Anki add-on providing support for Korean study
https://ankiweb.net/shared/info/1336389630
GNU General Public License v3.0
19 stars 5 forks source link

Crashing during downloading audio due to single quote character #18

Closed cereska closed 3 years ago

cereska commented 4 years ago

Hi, I have reproduced this on many occasions, so I think it's best to report it.

I have created a custom cloze-deletion note type, that has Korean, English, Sound, Hanja etc fields, so that I can use Korean Support add-on with it (as per documentation). Generally it's been working fine, but when I write in a hint like this, with a single quote character: {{c1::(here goes the korean word)::one's something}} as soon as I lose focus on the Korean textfield by clicking on another textfield (the time where it attempts to download the audio), the add-on crashes, gives me a pop up with the info that it did and I have to restart Anki. If I edit out the single quote, it works again. I'm using Naver TTS.

For the sake of logging the ticket, I reproduced it also on the Korean (advanced) note type that comes with the add-on, as long as there is a single quote in the Korean field (or even two single quotes with some text between), it crashes. Out of curiosity, I also wrote (in Korean advanced note type), in the Korean textfield, some korean text wrapped in double quotes. It only filled the silhouette field, it couldn't download audio at all, but at least it didn't crash.

I really hope you are able to fix this parsing issue. Thank you for all your hard work!

scottgigante commented 3 years ago

Thank you for the report. This is finally fixed!