any-shell-escape's Issues
UNIX support
This breaks on UNIX systems by adding a dollar sign ($) to the front of a string/file path.
Example:
var escape = require('any-shell-escape');
var url = "/var/www/html/file one.js";
console.log(escape([url]));
returns:
$'/var/www/html/file one.js'
not:
'/var/www/html/file one.js'
Doesn't quote empty strings on Unix
(via)
const test = str => console.log('[' + shellEscape(str) + ']')
test("foo") // => [foo] ✔
test(" ") // => [' '] ✔
test("") // => [] ?
Powershell escaping different from Command Prompt
I'm not sure why but I have to write four quotes which turns out to one in Powershell.
my test.js file
console.log(process.argv);
output on powershell
PS C:\> node test "test two three"
[ 'C:\\Program Files\\nodejs\\node.exe',
'C:\\test',
'test two three' ]
PS C:\> node test "test ""two"" three"
[ 'C:\\Program Files\\nodejs\\node.exe',
'C:\\test',
'test two three' ]
PS C:\> node test "test """"two"""" three"
[ 'C:\\Program Files\\nodejs\\node.exe',
'C:\\test',
'test "two" three' ]
output on command prompt (expected and working)
C:\>node test "test two three"
[ 'C:\\Program Files\\nodejs\\node.exe',
'C:\\test',
'test two three' ]
C:\>node test "test ""two"" three"
[ 'C:\\Program Files\\nodejs\\node.exe',
'C:\\test',
'test "two" three' ]
C:\>node test "test """"two"""" three"
[ 'C:\\Program Files\\nodejs\\node.exe',
'C:\\test',
'test ""two"" three' ]
I'm not sure the best way to fix this because the module only knows if it's windows or linux. My only guess on how to fix this is to add in an argument which tells the module if it's for powershell or command prompt. Thoughts or other solutions to this problem?
Some typos in the README
The README is still referring to shell-escape instead of any-shell-escape, including the title.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.