mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
handle remote links in ts pages
Required to avoid loading remote links embedded in deck descriptions in the webview
This commit is contained in:
parent
ded626f0b9
commit
e30b7fc36a
1 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ class AnkiWebPage(QWebEnginePage):
|
|||
def acceptNavigationRequest(
|
||||
self, url: QUrl, navType: Any, isMainFrame: bool
|
||||
) -> bool:
|
||||
if not self.open_links_externally:
|
||||
if not self.open_links_externally or "_anki/pages" in url.path():
|
||||
return super().acceptNavigationRequest(url, navType, isMainFrame)
|
||||
|
||||
if not isMainFrame:
|
||||
|
@ -636,7 +636,7 @@ document.head.appendChild(style);
|
|||
def load_ts_page(self, name: str) -> None:
|
||||
from aqt import mw
|
||||
|
||||
self.set_open_links_externally(False)
|
||||
self.set_open_links_externally(True)
|
||||
if theme_manager.night_mode:
|
||||
extra = "#night"
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue