mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Fixes [https://github.com/elastic/kibana/security/code-scanning/419](https://github.com/elastic/kibana/security/code-scanning/419) _Suggested fixes powered by Copilot Autofix. Review carefully before merging._ Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
374351af56
commit
35edfd0edc
1 changed files with 2 additions and 2 deletions
|
@ -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) => {
|
||||
|
@ -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}"`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue