diff options
| author | Noam Postavsky | 2016-07-03 09:56:36 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2016-07-03 15:05:20 -0400 |
| commit | 178b2f590982e37991bc72b08a9e02b64d750601 (patch) | |
| tree | bbc08a39311cd65d9870376dda28de3d451efb16 /lisp | |
| parent | dec756756070d271925c8c2a705de97eb8d7fb0b (diff) | |
| download | emacs-178b2f590982e37991bc72b08a9e02b64d750601.tar.gz emacs-178b2f590982e37991bc72b08a9e02b64d750601.zip | |
Note combine-and-quote-strings doesn't shell quote
* doc/lispref/processes.texi (Shell Arguments):
* lisp/subr.el (combine-and-quote-strings): Add a note that
combine-and-quote-strings doesn't protect arguments against shell
evaluation (Bug #20333).
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/subr.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index ed2166a0ee2..e9e19d35f65 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -3706,7 +3706,10 @@ Modifies the match data; use `save-match-data' if necessary." | |||
| 3706 | "Concatenate the STRINGS, adding the SEPARATOR (default \" \"). | 3706 | "Concatenate the STRINGS, adding the SEPARATOR (default \" \"). |
| 3707 | This tries to quote the strings to avoid ambiguity such that | 3707 | This tries to quote the strings to avoid ambiguity such that |
| 3708 | (split-string-and-unquote (combine-and-quote-strings strs)) == strs | 3708 | (split-string-and-unquote (combine-and-quote-strings strs)) == strs |
| 3709 | Only some SEPARATORs will work properly." | 3709 | Only some SEPARATORs will work properly. |
| 3710 | |||
| 3711 | Note that this is not intended to protect STRINGS from | ||
| 3712 | interpretation by shells, use `shell-quote-argument' for that." | ||
| 3710 | (let* ((sep (or separator " ")) | 3713 | (let* ((sep (or separator " ")) |
| 3711 | (re (concat "[\\\"]" "\\|" (regexp-quote sep)))) | 3714 | (re (concat "[\\\"]" "\\|" (regexp-quote sep)))) |
| 3712 | (mapconcat | 3715 | (mapconcat |