]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/backend/wiki.py
wiki: Fix rendering external images
[ipfire.org.git] / src / backend / wiki.py
index 748934359c00f9d0127d30657d8283075d01c99c..6ee8de6f1f7caaed9d5d4cf62b9baf52c16f063b 100644 (file)
@@ -844,6 +844,12 @@ class WikiRenderer(misc.Object):
                        </div>
                """
 
+               # Try to split query string
+               url, delimiter, qs = url.partition("?")
+
+               # Parse query arguments
+               args = urllib.parse.parse_qs(qs)
+
                # Skip any absolute and external URLs
                if url.startswith("https://") or url.startswith("http://"):
                        return html % {
@@ -853,12 +859,6 @@ class WikiRenderer(misc.Object):
                                "args"      : args,
                        }
 
-               # Try to split query string
-               url, delimiter, qs = url.partition("?")
-
-               # Parse query arguments
-               args = urllib.parse.parse_qs(qs)
-
                # Build absolute path
                url = self.backend.wiki.make_path(self.path, url)