mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 13:12:35 +02:00
Explicitly disable plugins when rendering HTML for covers. According to the Qt docs they should be disabled by default, but https://bugs.launchpad.net/bugs/1270297 implies they are not.
This commit is contained in:
parent
83ac6bd846
commit
31a94acf5b
1 changed files with 2 additions and 0 deletions
|
|
@ -138,6 +138,8 @@ def render_html(path_to_html, width=590, height=750, as_xhtml=True):
|
|||
path_to_html = os.path.abspath(path_to_html)
|
||||
with CurrentDir(os.path.dirname(path_to_html)):
|
||||
page = QWebPage()
|
||||
settings = page.settings()
|
||||
settings.setAttribute(settings.PluginsEnabled, False)
|
||||
pal = page.palette()
|
||||
pal.setBrush(QPalette.Background, Qt.white)
|
||||
page.setPalette(pal)
|
||||
|
|
|
|||
Loading…
Reference in a new issue