Escape backslash within string fields (#3161)
This commit is contained in:
@@ -257,6 +257,7 @@ func TestNewMetric_Fields(t *testing.T) {
|
||||
"string": "test",
|
||||
"quote_string": `x"y`,
|
||||
"backslash_quote_string": `x\"y`,
|
||||
"backslash": `x\y`,
|
||||
}
|
||||
m, err := New("cpu", tags, fields, now)
|
||||
assert.NoError(t, err)
|
||||
@@ -708,12 +709,6 @@ func TestNewMetric_TrailingSlash(t *testing.T) {
|
||||
`value\`: "x",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "cpu",
|
||||
fields: map[string]interface{}{
|
||||
"value": `x\`,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "cpu",
|
||||
tags: map[string]string{
|
||||
|
||||
Reference in New Issue
Block a user