Fix for nested gemini query URL parsing.
authorplugd <plugd@thelambdalab.xyz>
Tue, 22 Oct 2024 16:23:42 +0000 (18:23 +0200)
committerplugd <plugd@thelambdalab.xyz>
Tue, 22 Oct 2024 16:24:12 +0000 (18:24 +0200)
elpher.el

index a880f79..5e21508 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -1645,9 +1645,10 @@ treatment that a separate function is warranted."
         (cond
          ((string-prefix-p "/" (url-filename address))) ;do nothing for absolute case
          ((string-prefix-p "?" (url-filename address)) ;handle query-only links
-          (setf (url-filename address)
-                (concat (url-filename current-address)
-                        (url-filename address))))
+          (let* ((current-path (car (url-path-and-query current-address))))
+            (setf (url-filename address)
+                  (concat current-path  ;(url-filename current-address)
+                          (url-filename address)))))
          (t ;deal with relative links
           (setf (url-filename address)
                 (concat (file-name-directory (url-filename current-address))