You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2024/07/30 22:36:32 UTC

(superset) branch master updated: fix: Fixing incomplete string escaping. (#29772)

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 2bce20f790 fix: Fixing incomplete string escaping.  (#29772)
2bce20f790 is described below

commit 2bce20f790a31f3342bda61d830365e91e518fb3
Author: Evan Rusackas <ev...@preset.io>
AuthorDate: Tue Jul 30 16:36:26 2024 -0600

    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 4fc8147a18..f468854955 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}`;