mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
make sure we normalize deck names on input
https://anki.tenderapp.com/discussions/ankidesktop/31635-anki-crashes-when-new-card-is-added
This commit is contained in:
parent
1c39f4c194
commit
71e0c88032
1 changed files with 1 additions and 0 deletions
|
@ -131,6 +131,7 @@ class DeckManager:
|
|||
def id(self, name, create=True, type=defaultDeck):
|
||||
"Add a deck with NAME. Reuse deck if already exists. Return id as int."
|
||||
name = name.replace('"', '')
|
||||
name = unicodedata.normalize("NFC", name)
|
||||
for id, g in list(self.decks.items()):
|
||||
if unicodedata.normalize("NFC", g['name'].lower()) == name.lower():
|
||||
return int(id)
|
||||
|
|
Loading…
Reference in a new issue