From 3a1bb7f503004bba88c3b18be5007ba3de3e759a Mon Sep 17 00:00:00 2001 From: conao3 Date: Tue, 11 Feb 2020 04:38:19 +0900 Subject: [PATCH] use shell-quote-argument to create safe shell command --- smog.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/smog.el b/smog.el index 0a8d9cf..627a545 100644 --- a/smog.el +++ b/smog.el @@ -145,7 +145,8 @@ Further details can be found in the =style(1)= man page.\n" (smog-target (buffer-file-name (current-buffer)))) ;; run the shell command. synchronously. (shell-command - (format "%s '%s'" smog-command smog-target) smog-output) + (mapconcat #'shell-quote-argument (list smog-command smog-target) " ") + smog-output) ;; output the results and add references (in org-mode if it's available) (with-current-buffer smog-output (goto-char (point-min))