mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Allow clicking on calibre:// URLs. Fixes #2029014 [blocking navigation request to other books](https://bugs.launchpad.net/calibre/+bug/2029014)
This commit is contained in:
parent
088954ae65
commit
deec86c82b
@ -348,7 +348,7 @@ class WebPage(QWebEnginePage):
|
||||
return True
|
||||
if url.scheme() in (FAKE_PROTOCOL, 'data'):
|
||||
return True
|
||||
if url.scheme() in ('http', 'https') and req_type == QWebEnginePage.NavigationType.NavigationTypeLinkClicked:
|
||||
if url.scheme() in ('http', 'https', 'calibre') and req_type == QWebEnginePage.NavigationType.NavigationTypeLinkClicked:
|
||||
safe_open_url(url)
|
||||
prints('Blocking navigation request to:', url.toString())
|
||||
return False
|
||||
|
@ -358,7 +358,7 @@ class WebPage(QWebEnginePage):
|
||||
return True
|
||||
if url.scheme() in (FAKE_PROTOCOL, 'data'):
|
||||
return True
|
||||
if url.scheme() in ('http', 'https') and req_type == QWebEnginePage.NavigationType.NavigationTypeLinkClicked:
|
||||
if url.scheme() in ('http', 'https', 'calibre') and req_type == QWebEnginePage.NavigationType.NavigationTypeLinkClicked:
|
||||
safe_open_url(url)
|
||||
prints('Blocking navigation request to:', url.toString())
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user