]> git.ipfire.org Git - ipfire.org.git/commitdiff
wiki: Fix rendering external images
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Jan 2024 18:04:59 +0000 (18:04 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Jan 2024 18:04:59 +0000 (18:04 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
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)