From 78c5838e4e64d4582c345eca0e5ae76aee1842d2 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 25 Oct 2012 16:23:51 +0200 Subject: [PATCH] ob-exp: Escape code when re-creating a src blocks * lisp/ob-exp.el (org-babel-exp-code): Escape code when re-creating a src blocks. --- lisp/ob-exp.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el index a2b0f482c..0a02ea193 100644 --- a/lisp/ob-exp.el +++ b/lisp/ob-exp.el @@ -48,7 +48,7 @@ (declare-function org-element-context "org-element" ()) (declare-function org-element-property "org-element" (property element)) (declare-function org-element-type "org-element" (element)) - +(declare-function org-escape-code-in-string "org-src" (s)) (defcustom org-export-babel-evaluate t "Switch controlling code evaluation during export. @@ -359,7 +359,7 @@ replaced with its value." (org-fill-template org-babel-exp-code-template `(("lang" . ,(nth 0 info)) - ("body" . ,(nth 1 info)) + ("body" . ,(org-escape-code-in-string (nth 1 info))) ,@(mapcar (lambda (pair) (cons (substring (symbol-name (car pair)) 1) (format "%S" (cdr pair))))