mirror of
https://codeberg.org/cage/tinmop/
synced 2024-12-26 00:02:34 +01:00
- [gemini] prevented crash when an illegal character is found in an URI.
This commit is contained in:
parent
456602f89c
commit
a3ff4793f6
@ -74,25 +74,26 @@
|
|||||||
*open-message-link-window*))
|
*open-message-link-window*))
|
||||||
|
|
||||||
(defun open-message-link (url enqueue)
|
(defun open-message-link (url enqueue)
|
||||||
(let* ((parsed (iri:iri-parse url))
|
(tui-utils:with-notify-errors
|
||||||
(scheme (uri:scheme parsed))
|
(let* ((parsed (iri:iri-parse url))
|
||||||
(decoded-path (percent-decode url)))
|
(scheme (uri:scheme parsed))
|
||||||
(when (and (not enqueue)
|
(decoded-path (percent-decode url)))
|
||||||
(swconf:close-link-window-after-select-p))
|
(when (and (not enqueue)
|
||||||
(ui:close-open-message-link-window))
|
(swconf:close-link-window-after-select-p))
|
||||||
(cond
|
(ui:close-open-message-link-window))
|
||||||
((string= gemini-constants:+gemini-scheme+ scheme)
|
(cond
|
||||||
(db:insert-in-history (ui:open-url-prompt) url)
|
((string= gemini-constants:+gemini-scheme+ scheme)
|
||||||
(db:gemlog-mark-as-seen url)
|
(db:insert-in-history (ui:open-url-prompt) url)
|
||||||
(gemini-viewer:ensure-just-one-stream-rendering)
|
(db:gemlog-mark-as-seen url)
|
||||||
(gemini-viewer:load-gemini-url url
|
(gemini-viewer:ensure-just-one-stream-rendering)
|
||||||
:give-focus-to-message-window t
|
(gemini-viewer:load-gemini-url url
|
||||||
:enqueue enqueue
|
:give-focus-to-message-window t
|
||||||
:use-cached-file-if-exists t))
|
:enqueue enqueue
|
||||||
((fs:dirp decoded-path)
|
:use-cached-file-if-exists t))
|
||||||
(ui:open-file-explorer decoded-path))
|
((fs:dirp decoded-path)
|
||||||
(t
|
(ui:open-file-explorer decoded-path))
|
||||||
(os-utils:open-resource-with-external-program decoded-path nil)))))
|
(t
|
||||||
|
(os-utils:open-resource-with-external-program decoded-path nil))))))
|
||||||
|
|
||||||
(defclass open-links-window ()
|
(defclass open-links-window ()
|
||||||
((links
|
((links
|
||||||
|
Loading…
Reference in New Issue
Block a user