summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@bzg.fr>2020-06-05 14:50:27 +0200
committerBastien Guerry <bzg@bzg.fr>2020-06-05 14:50:27 +0200
commit706970efb1d86cf5a8e2eba3d8cd894138a0c333 (patch)
treea1e96c90df35502cc21a30ab28541c43a9e7439c
parentfa4dddf8d29063dbd2161b7f33a776e2c063ed10 (diff)
downloadorg-mode-706970efb1d86cf5a8e2eba3d8cd894138a0c333.tar.gz
ox-texinfo.el: Fix escaping special chars in raw-path
* lisp/ox-texinfo.el (org-texinfo-link): Escape @, { and } characters in the link path.
-rw-r--r--lisp/ox-texinfo.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index 4265a85..f39a39d 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