From adad3b4d1f03f51b72b3996fb26071d48fd1f09e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 16 Oct 2019 04:34:57 +0530 Subject: [PATCH] Viewer: Fix rendering of books with mathematics failing --- src/calibre/gui2/viewer/web_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/viewer/web_view.py b/src/calibre/gui2/viewer/web_view.py index febf98dd3d..c54e7cd376 100644 --- a/src/calibre/gui2/viewer/web_view.py +++ b/src/calibre/gui2/viewer/web_view.py @@ -167,7 +167,7 @@ class UrlSchemeHandler(QWebEngineUrlSchemeHandler): import json from calibre.srv.books import get_mathjax_manifest self.mathjax_manifest = json.dumps(get_mathjax_manifest()['files']) - send_reply(rq, 'application/json', self.mathjax_manifest) + send_reply(rq, 'application/json', as_bytes(self.mathjax_manifest)) return path = os.path.abspath(os.path.join(self.mathjax_dir, '..', name)) if path.startswith(self.mathjax_dir):