1
0
Fork 0

- [GUI] prevented to transform to an absolute URL an already absolute URL.

This commit is contained in:
cage 2023-09-10 21:47:08 +02:00
parent 8aecf478b4
commit 676cf0759f
1 changed files with 11 additions and 9 deletions

View File

@ -338,15 +338,17 @@
(to-s copy))) (to-s copy)))
(defun absolutize-link (request-iri link-value) (defun absolutize-link (request-iri link-value)
(let ((parsed-request-iri (iri:iri-parse request-iri))) (if (iri:absolute-url-p link-value)
(multiple-value-bind (x host path query port y w z) link-value
(gemini-client:displace-iri parsed-request-iri) (let ((parsed-request-iri (iri:iri-parse request-iri)))
(declare (ignore x y w z)) (multiple-value-bind (x host path query port y w z)
(gemini-parser:absolutize-link link-value (gemini-client:displace-iri parsed-request-iri)
host (declare (ignore x y w z))
port (gemini-parser:absolutize-link link-value
path host
query)))) port
path
query)))))
(defun slurp-iri (main-window iri) (defun slurp-iri (main-window iri)
(if (not (iri:absolute-url-p iri)) (if (not (iri:absolute-url-p iri))