diff --git a/src/calibre/ebooks/oeb/transforms/unsmarten.py b/src/calibre/ebooks/oeb/transforms/unsmarten.py index c01094681f..05f0fd59ca 100644 --- a/src/calibre/ebooks/oeb/transforms/unsmarten.py +++ b/src/calibre/ebooks/oeb/transforms/unsmarten.py @@ -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: