From 8a8607b0100db1fbb9655b476df21ed3434f5008 Mon Sep 17 00:00:00 2001 From: nsdeschenes Date: Thu, 27 Nov 2025 14:31:55 -0400 Subject: [PATCH 1/2] :adhesive_bandage: Add in temp fix to resolve issue for users --- static/app/views/explore/utils.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/static/app/views/explore/utils.tsx b/static/app/views/explore/utils.tsx index b6a2c6a4d0a76d..b3bca2af3d7999 100644 --- a/static/app/views/explore/utils.tsx +++ b/static/app/views/explore/utils.tsx @@ -289,7 +289,13 @@ export function generateTargetQuery({ } else if (groupBy === 'environment' && typeof value === 'string') { location.query.environment = value; } else if (typeof value === 'string') { - search.setFilterValues(groupBy, [value]); + // TODO(nsdeschenes): Remove this once we have a proper way to handle quoted values + // that have square brackets included in the value + if (value.startsWith('[') && value.endsWith(']')) { + search.setFilterValues(groupBy, [`"${value}"`]); + } else { + search.setFilterValues(groupBy, [value]); + } } } From 3c8e88b69fc44a5b3f742cc5e07b3ddbac656288 Mon Sep 17 00:00:00 2001 From: nsdeschenes Date: Thu, 27 Nov 2025 15:37:02 -0400 Subject: [PATCH 2/2] :necktie: Escape double quotes --- static/app/views/explore/utils.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/app/views/explore/utils.tsx b/static/app/views/explore/utils.tsx index b3bca2af3d7999..1f97455b80f293 100644 --- a/static/app/views/explore/utils.tsx +++ b/static/app/views/explore/utils.tsx @@ -11,7 +11,7 @@ import type {PageFilters} from 'sentry/types/core'; import type {Tag, TagCollection} from 'sentry/types/group'; import type {Confidence, Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined, escapeDoubleQuotes} from 'sentry/utils'; import {encodeSort} from 'sentry/utils/discover/eventView'; import type {Sort} from 'sentry/utils/discover/fields'; import { @@ -292,7 +292,7 @@ export function generateTargetQuery({ // TODO(nsdeschenes): Remove this once we have a proper way to handle quoted values // that have square brackets included in the value if (value.startsWith('[') && value.endsWith(']')) { - search.setFilterValues(groupBy, [`"${value}"`]); + search.setFilterValues(groupBy, [`"${escapeDoubleQuotes(value)}"`]); } else { search.setFilterValues(groupBy, [value]); }