Browse Source

ox-latex: Fix coderef links with special characters

* lisp/ox-latex.el (org-latex-link): Properly resolve coderefs with
special characters.

Reported-by: Vincent Picaud <picaud.vincent@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2020-06/msg00004.html>
Nicolas Goaziou 4 years ago
parent
commit
b908367b03
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/ox-latex.el

+ 3 - 1
lisp/ox-latex.el

@@ -2582,7 +2582,9 @@ INFO is a plist holding contextual information.  See
      ;; equivalent line number.
      ((string= type "coderef")
       (format (org-export-get-coderef-format path desc)
-	      (org-export-resolve-coderef path info)))
+	      ;; Resolve with RAW-PATH since PATH could be tainted
+	      ;; with `org-latex--protect-text' call above.
+	      (org-export-resolve-coderef raw-path info)))
      ;; External link with a description part.
      ((and path desc) (format "\\href{%s}{%s}" path desc))
      ;; External link without a description part.