org-html-link: Fix relative links with :html-link-use-abs-url

* lisp/ox-html.el (org-html-link): When publishing relative links with
both :html-link-use-abs-url and :html-link-home, ensure the correct
link is constructed.  Never append `home' to absolute paths.

TINYCHANGE
This commit is contained in:
Akira Kyle 2023-02-27 12:12:32 -07:00 committed by Ihor Radchenko
parent 879ba22ef6
commit 8fa7f0279e
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -3227,7 +3227,7 @@ INFO is a plist holding contextual information. See
(org-trim (plist-get info :html-link-home)))))
(when (and home
(plist-get info :html-link-use-abs-url)
(file-name-absolute-p raw-path))
(not (file-name-absolute-p raw-path)))
(setq raw-path (concat (file-name-as-directory home) raw-path))))
;; Maybe turn ".org" into ".html".
(setq raw-path (funcall link-org-files-as-html-maybe raw-path info))