aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--js/RrdCmdLine.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/js/RrdCmdLine.js b/js/RrdCmdLine.js
index a2be92e..c222498 100644
--- a/js/RrdCmdLine.js
+++ b/js/RrdCmdLine.js
@@ -389,11 +389,13 @@ RrdCmdLine.prototype = {
389 // DEF:<vname>=<rrdfile>:<ds-name>:<CF>[:step=<step>][:start=<time>][:end=<time>][:reduce=<CF>] 389 // DEF:<vname>=<rrdfile>:<ds-name>:<CF>[:step=<step>][:start=<time>][:end=<time>][:reduce=<CF>]
390 parse_def: function (line) 390 parse_def: function (line)
391 { 391 {
392 var args = line.split(/:/); 392 // Every character (except ':' and '\') are allowed within a value. The
393 var n=1; 393 // two exceptions must be escaped with a slash.
394 var vnames = args[n++].split('='); 394 var args = line.match(/(\\.|[^:\\])+/g);
395 var vname = vnames[0]; 395 var n = 1;
396 var rrdfile = vnames[1]; 396 var vnames = args[n++];
397 var vname = vnames.substr(0, vnames.indexOf("="));
398 var rrdfile = vnames.substr(vname.length + 1).replace(/\\(.)/g, "$1");
397 var name = args[n++]; 399 var name = args[n++];
398 var cf = args[n++]; 400 var cf = args[n++];
399 var step, reduce, start, end; 401 var step, reduce, start, end;