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).
This commit is contained in:
parent
dec7567560
commit
178b2f5909
2 changed files with 9 additions and 1 deletions
|
@ -3706,7 +3706,10 @@ Modifies the match data; use `save-match-data' if necessary."
|
|||
"Concatenate the STRINGS, adding the SEPARATOR (default \" \").
|
||||
This tries to quote the strings to avoid ambiguity such that
|
||||
(split-string-and-unquote (combine-and-quote-strings strs)) == strs
|
||||
Only some SEPARATORs will work properly."
|
||||
Only some SEPARATORs will work properly.
|
||||
|
||||
Note that this is not intended to protect STRINGS from
|
||||
interpretation by shells, use `shell-quote-argument' for that."
|
||||
(let* ((sep (or separator " "))
|
||||
(re (concat "[\\\"]" "\\|" (regexp-quote sep))))
|
||||
(mapconcat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue