Fix #2003 (lrs2lrf mistranslates XML entities)

This commit is contained in:
Kovid Goyal 2009-03-08 21:41:56 -07:00
parent 05329f8ca1
commit 06f67d6cde

View File

@ -28,8 +28,9 @@ class LrsParser(object):
def __init__(self, stream, logger): def __init__(self, stream, logger):
self.logger = logger self.logger = logger
src = stream.read() src = stream.read()
self.soup = BeautifulStoneSoup(xml_to_unicode(src)[0], self.soup = BeautifulStoneSoup(xml_to_unicode(src)[0],
selfClosingTags=self.SELF_CLOSING_TAGS) convertEntities=BeautifulStoneSoup.XML_ENTITIES,
selfClosingTags=self.SELF_CLOSING_TAGS)
self.objects = {} self.objects = {}
for obj in self.soup.findAll(objid=True): for obj in self.soup.findAll(objid=True):
self.objects[obj['objid']] = obj self.objects[obj['objid']] = obj