소스 검색

ox-html: Properly encode links without a description

* lisp/ox-html.el (org-html-link): Encode URI in default description
  when none is provided.

Reported-by: mail@fritzreichwald.de
<http://permalink.gmane.org/gmane.emacs.orgmode/104645>
Nicolas Goaziou 9 년 전
부모
커밋
48e046047b
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 4
      lisp/ox-html.el

+ 2 - 4
lisp/ox-html.el

@@ -2963,10 +2963,8 @@ INFO is a plist holding contextual information.  See
 			      attributes
 			      desc))
      ;; External link without a description part.
-     (path (format "<a href=\"%s\"%s>%s</a>"
-		   (org-html-encode-plain-text path)
-		   attributes
-		   path))
+     (path (let ((path (org-html-encode-plain-text path)))
+	     (format "<a href=\"%s\"%s>%s</a>" path attributes path)))
      ;; No path, only description.  Try to do something useful.
      (t (format "<i>%s</i>" desc)))))