From 09b90c603a2e2e078c93ae19ff10d287dc9196c3 Mon Sep 17 00:00:00 2001 From: Erwan Grooters Date: Sun, 7 Dec 2025 11:28:08 +0100 Subject: [PATCH] Fix: Allow custom URL schemes in OpenInBrowser action --- actions/OpenInBrowser/OpenInBrowser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/actions/OpenInBrowser/OpenInBrowser.py b/actions/OpenInBrowser/OpenInBrowser.py index df16a06..02f1890 100644 --- a/actions/OpenInBrowser/OpenInBrowser.py +++ b/actions/OpenInBrowser/OpenInBrowser.py @@ -6,6 +6,7 @@ import os from PIL import Image import webbrowser +from urllib.parse import urlparse # Import gtk modules import gi @@ -60,7 +61,8 @@ def open_url(self, url): if url in [None, ""]: return - if not url.startswith("http://") and not url.startswith("https://"): + # Allow any custom scheme, but default to https when no scheme is provided + if not urlparse(url).scheme: url = "https://" + url new = 1 if self.get_settings().get("new_window", False) else 0