From 2bce20f790a31f3342bda61d830365e91e518fb3 Mon Sep 17 00:00:00 2001 From: Evan Rusackas Date: Tue, 30 Jul 2024 16:36:26 -0600 Subject: [PATCH] fix: Fixing incomplete string escaping. (#29772) --- superset-frontend/src/explore/exploreUtils/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/explore/exploreUtils/index.js b/superset-frontend/src/explore/exploreUtils/index.js index 4fc8147a1..f46885495 100644 --- a/superset-frontend/src/explore/exploreUtils/index.js +++ b/superset-frontend/src/explore/exploreUtils/index.js @@ -316,7 +316,7 @@ export const getSimpleSQLExpression = (subject, operator, comparator) => { .map(val => optionLabel(val)) .map( val => - `${quote}${isString ? String(val).replace("'", "''") : val}${quote}`, + `${quote}${isString ? String(val).replace(/'/g, "''") : val}${quote}`, ); if (comparatorArray.length > 0) { expression += ` ${prefix}${formattedComparators.join(', ')}${suffix}`;