mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2175 (Error when trying to open ebook viewer)
This commit is contained in:
parent
0b345b8562
commit
411c397bed
@ -368,7 +368,7 @@ class DocumentView(QWebView):
|
||||
|
||||
def load_path(self, path, pos=0.0):
|
||||
self.initial_pos = pos
|
||||
html = open(path, 'rb').read().decode(path.encoding)
|
||||
html = open(path, 'rb').read().decode(path.encoding, 'replace')
|
||||
html = EntityDeclarationProcessor(html).processed_html
|
||||
self.setHtml(html, QUrl.fromLocalFile(path))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user