Skip to content

Commit

Permalink
Fix code scanning alert #419: Incomplete string escaping or encoding
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
smith and github-advanced-security[bot] authored Sep 18, 2024
1 parent 4c51c00 commit d5c2208
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const createFilterFromOptions = (
filters.push(options.filterQuery);
}
if (options.groupBy) {
const id = series.id.replace('"', '\\"');
const id = series.id.replace(/"/g, '\\"');
const groupByFilters = Array.isArray(options.groupBy)
? options.groupBy
.map((field, index) => {
Expand All @@ -125,7 +125,7 @@ export const createFilterFromOptions = (
if (!value) {
return null;
}
return `${field}: "${value.replace('"', '\\"')}"`;
return `${field}: "${value.replace(/"/g, '\\"')}"`;
})
.join(' and ')
: `${options.groupBy} : "${id}"`;
Expand Down

0 comments on commit d5c2208

Please sign in to comment.