Encode URL in exported links.

This commit is contained in:
cnngimenez 2022-01-10 11:58:50 -03:00
parent 3f1aabc140
commit 249d2be0e0

View File

@ -20,6 +20,7 @@
(require 'ox-publish) (require 'ox-publish)
(require 'ox-ascii) (require 'ox-ascii)
(require 'cl-lib) (require 'cl-lib)
(require 'url-util)
;; TODO: ;; TODO:
;; Sublists aren't supported in gemini ;; Sublists aren't supported in gemini
@ -94,7 +95,7 @@ It's output just before each section. LINKS is a list of each link. INFO is a
(anchor (org-export-data (anchor (org-export-data
(or desc (org-element-property :raw-link link)) (or desc (org-element-property :raw-link link))
info))) info)))
(format "=> %s %s\n" path anchor))) (format "=> %s %s\n" (url-encode-url path) anchor)))
links "") links "")
(when (car links) (when (car links)
"\n"))) "\n")))