aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ennu-html.el33
1 files changed, 19 insertions, 14 deletions
diff --git a/ennu-html.el b/ennu-html.el
index 1f76f23..10025bc 100644
--- a/ennu-html.el
+++ b/ennu-html.el
@@ -286,10 +286,11 @@
(org-html-link
(org-element-put-property
(org-element-put-property
- link :path (expand-file-name*
- (ennu-image-output-filename
- path (ennu-setting :default-image-width))
- (ennu-setting :images-directory)))
+ link :path (url-encode-url
+ (expand-file-name*
+ (ennu-image-output-filename
+ path (ennu-setting :default-image-width))
+ (ennu-setting :images-directory))))
:type "file")
desc info))))
;; Pass other link types to org-html-link
@@ -306,8 +307,8 @@
((or 'ennu-html 'html)
(let ((filename (concat (expand-file-name path (ennu-setting :posts-directory))
".org")))
- (xmlgen `(a :href ,(expand-file-name*
- path (ennu-setting :posts-directory))
+ (xmlgen `(a :href ,(url-encode-url
+ (expand-file-name* path (ennu-setting :posts-directory)))
,(or desc (ennu-post-title (ennu-read-post filename)))))))))
(defun ennu-follow-post (path)
@@ -329,10 +330,11 @@
(pcase backend
((or 'ennu-html 'html)
(xmlgen
- `(img :src ,(expand-file-name*
- (ennu-image-output-filename
- path (ennu-setting :thumbnail-image-width))
- (ennu-setting :images-directory)))))))
+ `(img :src ,(url-encode-url
+ (expand-file-name*
+ (ennu-image-output-filename
+ path (ennu-setting :thumbnail-image-width))
+ (ennu-setting :images-directory))))))))
(org-link-set-parameters
"thumbnail"
@@ -344,8 +346,9 @@
((or 'ennu-html 'html)
(let ((video-directory (ennu-setting :video-directory)))
(xmlgen
- `(video :src ,(expand-file-name* path video-directory)
- :poster ,(expand-file-name* (ennu-video-poster path) video-directory)
+ `(video :src ,(url-encode-url (expand-file-name* path video-directory))
+ :poster ,(url-encode-url
+ (expand-file-name* (ennu-video-poster path) video-directory))
:preload "none"
:controls ""))))))
@@ -356,7 +359,8 @@
(pcase backend
((or 'ennu-html 'html)
(xmlgen
- `(a :href ,(expand-file-name* path (ennu-setting :static-directory))
+ `(a :href ,(url-encode-url
+ (expand-file-name* path (ennu-setting :static-directory)))
,desc)))))
(org-link-set-parameters
@@ -369,7 +373,8 @@
(pcase backend
((or 'ennu-html 'html)
(xmlgen
- `(a :href ,(expand-file-name* tag (ennu-setting :tag-directory))
+ `(a :href ,(url-encode-url
+ (expand-file-name* tag (ennu-setting :tag-directory)))
,(or desc tag))))))
(org-link-set-parameters