From 706970efb1d86cf5a8e2eba3d8cd894138a0c333 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 5 Jun 2020 14:50:27 +0200 Subject: [PATCH] ox-texinfo.el: Fix escaping special chars in raw-path * lisp/ox-texinfo.el (org-texinfo-link): Escape @, { and } characters in the link path. --- lisp/ox-texinfo.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 4265a85d1..f39a39dbb 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -1046,7 +1046,10 @@ DESC is the description part of the link, or the empty string. INFO is a plist holding contextual information. See `org-export-data'." (let* ((type (org-element-property :type link)) - (raw-path (org-element-property :path link)) + (raw-path + (replace-regexp-in-string + "[@{}]" "@\\&" + (org-element-property :path link))) ;; Ensure DESC really exists, or set it to nil. (desc (and (not (string= desc "")) desc)) (path (cond