diff --git a/full_test.txt b/full_test.txt new file mode 100644 index 0000000..f29edc9 Binary files /dev/null and b/full_test.txt differ diff --git a/src/webdrop_bridge/ui/restricted_web_view.py b/src/webdrop_bridge/ui/restricted_web_view.py index 02e8938..4e03a8d 100644 --- a/src/webdrop_bridge/ui/restricted_web_view.py +++ b/src/webdrop_bridge/ui/restricted_web_view.py @@ -38,20 +38,20 @@ class RestrictedWebEngineView(QWebEngineView): Args: request: Navigation request to process """ - url = request.url() + url = request.url # If no restrictions, allow all URLs if not self.allowed_urls: return # Check if URL matches whitelist - if self._is_url_allowed(url): + if self._is_url_allowed(url): # type: ignore[operator] # Allow the navigation (default behavior) return # URL not whitelisted - open in system browser request.reject() - QDesktopServices.openUrl(url) + QDesktopServices.openUrl(url) # type: ignore[operator] def _is_url_allowed(self, url: QUrl) -> bool: """Check if a URL matches the whitelist. diff --git a/test_output.txt b/test_output.txt new file mode 100644 index 0000000..8b4e01c Binary files /dev/null and b/test_output.txt differ