better shell-string protection

svn: r3396
This commit is contained in:
Eli Barzilay 2006-06-18 08:37:04 +00:00
parent ec8d820bf2
commit 00ecf6acae

View File

@ -240,8 +240,8 @@
args))))))
(define (protect-shell-string s)
(let ([s (if (path? s) (path->string s) s)])
(regexp-replace* #rx"[\"$`]" s "\\\\&")))
(regexp-replace*
#rx"[\"`'$\\]" (if (path? s) (path->string s) s) "\\\\&"))
(define (normalize+explode-path p)
(explode-path (normal-case-path (normalize-path p))))