Description: Properly quote arguments passed to shell.
Author: Jakub Wilk <jwilk@debian.org>
Forwarded: yes
Bug: http://sourceforge.net/tracker/?func=detail&aid=3001100&group_id=38414&atid=422030
Bug-Debian: http://bugs.debian.org/581522
Bug-Ubuntu: https://bugs.launchpad.net/bugs/579252

--- a/tools/editors/emacs/rst.el
+++ b/tools/editors/emacs/rst.el
@@ -3273,10 +3273,10 @@
                     (list command
                           (or options "")
                           (if conffile
-                              (concat "--config=\"" conffile "\"")
+                              (concat "--config=" (shell-quote-argument conffile))
                             "")
-                          bufname
-                          (concat outname extension))
+                          (shell-quote-argument bufname)
+                          (shell-quote-argument (concat outname extension)))
                     " "))
 
     ;; Invoke the compile command.
