Skip to content

Commit

Permalink
Merge pull request #80 from hobbyquaker/patch-1
Browse files Browse the repository at this point in the history
Escape spaces and commas in seriesName
  • Loading branch information
nichdiekuh committed Jul 6, 2015
2 parents 9a1c22c + f5e9472 commit 52ffb4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ InfluxDB.prototype._prepareValues = function (series) {
var output = []
_.forEach(series, function (values, seriesName) {
_.each(values, function (points) {
var line = seriesName
var line = seriesName.replace(/ /g, '\\ ').replace(/,/g, '\\,')
if (points[1] && _.isObject(points[1]) && _.keys(points[1]).length > 0) {
line += ',' + this._createKeyValueString(points[1])
}
Expand Down

0 comments on commit 52ffb4f

Please sign in to comment.