浏览代码

ob-plantuml: wrapping in-file and out-file in shell-quote-argument

  Thanks to Michael Gauland for pointing out this fix

* lisp/ob-plantuml.el (org-babel-execute:plantuml): wrapping in-file
  and out-file in shell-quote-argument
Eric Schulte 14 年之前
父节点
当前提交
fdad92edd6
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      lisp/ob-plantuml.el

+ 4 - 1
lisp/ob-plantuml.el

@@ -59,7 +59,10 @@ This function is called by `org-babel-execute-src-block'."
 	 (in-file (org-babel-temp-file "plantuml-"))
 	 (cmd (concat "java -jar "
 		      (shell-quote-argument org-plantuml-jar-path)
-		      " -p " cmdline " < " in-file " > " out-file)))
+		      " -p " cmdline " < "
+		      (shell-quote-argument in-file)
+		      " > "
+		      (shell-quote-argument out-file))))
     (unless (file-exists-p org-plantuml-jar-path)
       (error "Could not find plantuml.jar at %s" org-plantuml-jar-path))
     (with-temp-file in-file (insert (concat "@startuml\n" body "\n@enduml")))