From e610776bb0e832ad7114f4339f341ef052fcdbc6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 15 Jan 2013 06:37:30 +0900 Subject: [PATCH] possible fix for supermemo importer (#480) Not sure why the original author was converting angle brackets separately - that code breaks the example provided in #480, but I'm not sure if removing it will break other files. --- anki/importing/supermemo_xml.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/anki/importing/supermemo_xml.py b/anki/importing/supermemo_xml.py index 4676825d1..60c7fa0a4 100644 --- a/anki/importing/supermemo_xml.py +++ b/anki/importing/supermemo_xml.py @@ -63,6 +63,7 @@ class SuperMemoElement(SmartDict): class SupermemoXmlImporter(NoteImporter): needMapper = False + allowHTML = True """ Supermemo XML export's to Anki parser. @@ -136,8 +137,8 @@ class SupermemoXmlImporter(NoteImporter): #my sm2004 also ecaped & char in escaped sequences. s = re.sub(u'&',u'&',s) #unescaped solitary chars < or > that were ok for minidom confuse btfl soup - s = re.sub(u'>',u'>',s) - s = re.sub(u'<',u'<',s) + #s = re.sub(u'>',u'>',s) + #s = re.sub(u'<',u'<',s) return unicode(btflsoup(s,convertEntities=btflsoup.HTML_ENTITIES ))