diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index 5ead06138a..0d2e6e779a 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -308,14 +308,14 @@ class EditorWidget(QWebView): # {{{ def fget(self): ans = u'' - check = unicode(self.page().mainFrame().toPlainText()).strip() - if not check: - return ans try: + check = unicode(self.page().mainFrame().toPlainText()).strip() raw = unicode(self.page().mainFrame().toHtml()) raw = xml_to_unicode(raw, strip_encoding_pats=True, resolve_entities=True)[0] raw = self.comments_pat.sub('', raw) + if not check and '