diff --git a/src/calibre/gui2/viewer/documentview.py b/src/calibre/gui2/viewer/documentview.py index 11f2c61427..b03de237c1 100644 --- a/src/calibre/gui2/viewer/documentview.py +++ b/src/calibre/gui2/viewer/documentview.py @@ -709,7 +709,7 @@ class DocumentView(QWebView): # {{{ if self.manager is not None: self.manager.load_started() self.loading_url = QUrl.fromLocalFile(path) - html = re.sub(r'<\s*title\s*/\s*>', '', html, flags=re.IGNORECASE) + html = re.sub(ur'<\s*title\s*/\s*>', u'', html, flags=re.IGNORECASE) if has_svg: self.setContent(QByteArray(html.encode(path.encoding)), mt, QUrl.fromLocalFile(path)) else: