diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-03-05 10:06:45 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-03-05 10:06:45 +0100 |
commit | 5f2785f0a8a6a752a7de8a7c6332574ada4875aa (patch) | |
tree | 9fcd66d7aa79f18441285471f5ace6dfbf5c0515 /lib/utils | |
parent | 412529c54874e56c7680d248ae1c5a7e6e141a6d (diff) | |
download | gitbook-5f2785f0a8a6a752a7de8a7c6332574ada4875aa.zip gitbook-5f2785f0a8a6a752a7de8a7c6332574ada4875aa.tar.gz gitbook-5f2785f0a8a6a752a7de8a7c6332574ada4875aa.tar.bz2 |
Escape svgexport args
Fixes shakiba/svgexport#5 and #624
Diffstat (limited to 'lib/utils')
-rw-r--r-- | lib/utils/images.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/utils/images.js b/lib/utils/images.js index 1e90317..f1302c3 100644 --- a/lib/utils/images.js +++ b/lib/utils/images.js @@ -1,6 +1,7 @@ var _ = require("lodash"); var Q = require("q"); var fs = require("./fs"); +var shellescape = require('shell-escape'); var exec = require('child_process').exec; var links = require("./links"); @@ -15,7 +16,7 @@ var convertSVG = function(source, dest, options) { }); - var command = "svgexport "+source+" "+dest; + var command = shellescape(['svgexport', source, dest]); var child = exec(command, function (error, stdout, stderr) { if (error) { |