[Pkg-javascript-commits] [node-shell-quote] 04/137: expand more escape sequences in parse()

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:19:34 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-shell-quote.

commit 8b2224c465ef70d2320985c57dc0b8ee1c0a3664
Author: James Halliday <mail at substack.net>
Date:   Fri May 18 03:24:58 2012 -0700

    expand more escape sequences in parse()
---
 index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index 3c77961..fdbbf67 100644
--- a/index.js
+++ b/index.js
@@ -18,13 +18,13 @@ exports.parse = function (s) {
             if (/^'/.test(s)) {
                 return s
                     .replace(/^'|'$/g, '')
-                    .replace(/\\(['\\])/g, '$1')
+                    .replace(/\\(["'\\$`(){}!#&*|])/g, '$1');
                 ;
             }
             else if (/^"/.test(s)) {
                 return s
                     .replace(/^"|"$/g, '')
-                    .replace(/\\(["\\])/g, '$1')
+                    .replace(/\\(["'\\$`(){}!#&*|])/g, '$1');
                 ;
             }
             else return s;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-shell-quote.git



More information about the Pkg-javascript-commits mailing list