Skip to content

Commit dcf343e

Browse files
committed
Fix bash escaping.
1 parent 4582b4e commit dcf343e

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

image.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function Image(filename, useImageMagick, width, height) {
122122
this.width = width;
123123
this.height = height;
124124
this.builder = [];
125-
this.filename = type === 'string' ? framework_utils.escape_bash(filename) : null;
125+
this.filename = type === 'string' ? filename.escape_bash() : null;
126126
this.currentStream = type === 'object' ? filename : null;
127127
this.isIM = useImageMagick == null ? F.config['default-image-converter'] === 'im' : useImageMagick;
128128
this.outputType = type === 'string' ? framework_utils.getExtension(filename) : 'jpg';
@@ -195,7 +195,7 @@ Image.prototype.save = function(filename, callback, writer) {
195195
callback = filename;
196196
filename = null;
197197
} else if (filename)
198-
filename = framework_utils.escape_bash(filename);
198+
filename = filename.escape_bash();
199199

200200
!self.builder.length && self.minify();
201201
filename = filename || self.filename || '';
@@ -400,7 +400,7 @@ Image.prototype.push = function(key, value, priority, encode) {
400400

401401
if (value != null) {
402402
if (encode && typeof(value) === 'string')
403-
cmd += ' "' + framework_utils.escape_bash(value);
403+
cmd += ' "' + value.escape_bash();
404404
else
405405
cmd += ' "' + value + '"';
406406
}

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ function Framework() {
467467

468468
this.id = null;
469469
this.version = 2200;
470-
this.version_header = '2.2.0-7';
470+
this.version_header = '2.2.0-8';
471471
this.version_node = process.version.toString().replace('v', '').replace(/\./g, '').parseFloat();
472472

473473
this.config = {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"name": "Peter Štolc",
7676
"email": "stolcp@gmail.com"
7777
}],
78-
"version": "2.2.0-7",
78+
"version": "2.2.0-8",
7979
"homepage": "http://www.totaljs.com",
8080
"bugs": {
8181
"url": "https://github.com/totaljs/framework/issues",

0 commit comments

Comments
 (0)