diff --git a/resources/compiled_coffeescript.zip b/resources/compiled_coffeescript.zip index 275739a8af..4b5ab2b972 100644 Binary files a/resources/compiled_coffeescript.zip and b/resources/compiled_coffeescript.zip differ diff --git a/src/calibre/ebooks/oeb/polish/preview.coffee b/src/calibre/ebooks/oeb/polish/preview.coffee index 514ea329ce..40fa2d4f97 100644 --- a/src/calibre/ebooks/oeb/polish/preview.coffee +++ b/src/calibre/ebooks/oeb/polish/preview.coffee @@ -95,7 +95,7 @@ class PreviewIntegration loc.push(num) parent = parent.parentNode loc.reverse() - window.py_bridge.request_split(loc) + window.py_bridge.request_split(JSON.stringify(loc)) onload: () => window.document.body.addEventListener('click', this.onclick, true) diff --git a/src/calibre/gui2/tweak_book/preview.py b/src/calibre/gui2/tweak_book/preview.py index c25dfc303a..a2b8ecf00e 100644 --- a/src/calibre/gui2/tweak_book/preview.py +++ b/src/calibre/gui2/tweak_book/preview.py @@ -6,7 +6,7 @@ from __future__ import (unicode_literals, division, absolute_import, __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal ' -import time, textwrap +import time, textwrap, json from bisect import bisect_right from base64 import b64encode from future_builtins import map @@ -319,9 +319,10 @@ class WebPage(QWebPage): except (TypeError, ValueError, OverflowError, AttributeError): pass - @pyqtSlot('QList') + @pyqtSlot(str) def request_split(self, loc): actions['split-in-preview'].setChecked(False) + loc = json.loads(unicode(loc)) if not loc: return error_dialog(self.view(), _('Invalid location'), _('Cannot split on the body tag'), show=True)