diff --git a/lib/registry.js b/lib/registry.js index 127c659a..70d4f5ce 100644 --- a/lib/registry.js +++ b/lib/registry.js @@ -214,7 +214,7 @@ function escapeLabelValue(str) { return escapeString(str).replace(/"/g, '\\"'); } function escapeString(str) { - return str.replace(/\n/g, '\\n').replace(/\\(?!n)/g, '\\\\'); + return str.replace(/\\/g, '\\\\').replace(/\n/g, '\\n'); } function standardizeCounterName(name) { return name.replace(/_total$/, '');