From 0a612aec17969761c7930d6678169b46ab3f3d9a Mon Sep 17 00:00:00 2001 From: Bryce Buchanan Date: Wed, 6 Nov 2024 09:01:08 -0800 Subject: [PATCH] added '\' escapes --- .../metrics_explorer/components/helpers/create_tsvb_link.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts index 3192ccbf6f980..e41d191549c5a 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts @@ -114,7 +114,7 @@ export const createFilterFromOptions = ( filters.push(options.filterQuery); } if (options.groupBy) { - const id = series.id.replace(/"/g, '\\"'); + const id = series.id.replace(/\\/g, '\\\\').replace(/"/g, '\\"'); const groupByFilters = Array.isArray(options.groupBy) ? options.groupBy .map((field, index) => {