diff --git a/superset-frontend/src/explore/exploreUtils/index.js b/superset-frontend/src/explore/exploreUtils/index.js index 4fc8147a18961..f468854955ad9 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}`;