Commit 6a90690b authored by Efthymia Bika's avatar Efthymia Bika Committed by Giorgos Korfiatis

Add escape_quote function

parent f83ddbfc
......@@ -18,6 +18,7 @@ var path = require('path');
var mkdirp = require("mkdirp");
var exec = require('child_process').exec;
var execSync = require('child_process').execSync;
var execFile = require('child_process').execFile;
var BAAS_HOME_DIR = '.baas';
var CLOUDS_CONF_FILE = 'clouds.rc';
......@@ -157,3 +158,9 @@ function load_data_from_file(filename, callback) {
});
});
}
function escape_quote_str(str) {
if(!str) return "";
var escaped_quoted = str.replace(/'/g, "'\\''");
return "'" + escaped_quoted + "'";
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment