summaryrefslogtreecommitdiffstats
path: root/web/api
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2020-01-09 12:51:41 +0200
committerGitHub <noreply@github.com>2020-01-09 12:51:41 +0200
commit0fba85e2c20add69546cefbf37bb2033d2d1e052 (patch)
treedd124104fb54f99ef2ddca7e92e946d2d7f7aa31 /web/api
parent37edc6898b453b80806f07264cc94acf04bdd39e (diff)
Send host labels via exporting connectors (#7554)
* Add labels to the JSON exporting connector * Add labels to the Graphite exporting connector * Add labels to the OpenTSDB telnet exporting connector * Add labels to the OpenTSDB HTTP exporting connector * Replace control characters in JSON strings * Add unit tests
Diffstat (limited to 'web/api')
-rw-r--r--web/api/web_api_v1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c
index 072daea2ae..afbf88b4d5 100644
--- a/web/api/web_api_v1.c
+++ b/web/api/web_api_v1.c
@@ -780,7 +780,7 @@ inline void host_labels2json(RRDHOST *host, BUFFER *wb, size_t indentation) {
buffer_strcat(wb, tabs);
char value[CONFIG_MAX_VALUE * 2 + 1];
- escape_json_string(value, label->value, CONFIG_MAX_VALUE * 2);
+ sanitize_json_string(value, label->value, CONFIG_MAX_VALUE * 2);
buffer_sprintf(wb, "\"%s\": \"%s\"", label->key, value);
count++;