Fix unsmarten punctuation conversion option broken in 0.8.31. Fixes #905596 (0.8.31 Upgrade: Convert Books Error)

This commit is contained in:
Kovid Goyal 2011-12-17 08:48:36 +05:30
parent adf30396ec
commit 73bece5c40

View File

@ -16,7 +16,7 @@ class UnsmartenPunctuation(object):
def unsmarten(self, root):
for x in self.html_tags(root):
if not barename(x) == 'pre':
if not barename(x.tag) == 'pre':
if getattr(x, 'text', None):
x.text = unsmarten_text(x.text)
if getattr(x, 'tail', None) and x.tail: