From 4a20c9a5829d4ec82655ff801edc8e37f853d11f Mon Sep 17 00:00:00 2001 From: John Schember Date: Sat, 5 Dec 2009 21:39:33 -0500 Subject: [PATCH] PML Output: Remove unnecessary entity to unicode call. --- src/calibre/ebooks/pml/pmlml.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/calibre/ebooks/pml/pmlml.py b/src/calibre/ebooks/pml/pmlml.py index b40870c0b5..6c217f524c 100644 --- a/src/calibre/ebooks/pml/pmlml.py +++ b/src/calibre/ebooks/pml/pmlml.py @@ -158,12 +158,6 @@ class PMLMLizer(object): text = text.replace(u'\xc2', '') text = text.replace(u'\xa0', ' ') - # Turn all html entities into unicode. This should not be necessary as - # lxml should have already done this but we want to be sure it happens. - for entity in set(re.findall('&.+?;', text)): - mo = re.search('(%s)' % entity[1:-1], text) - text = text.replace(entity, entity_to_unicode(mo)) - # Turn all characters that cannot be represented by themself into their # PML code equivelent text = re.sub('[^\x00-\x7f]', lambda x: unipmlcode(x.group()), text)