mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[7.17] encoding fixes (#198857)
## Summary Fixes encoding errors where only the first `replace` match was getting replaced.
This commit is contained in:
parent
fc4b6e3bbf
commit
7e68e2c7f4
2 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
||||||
export function createPicker(fields: string[]) {
|
export function createPicker(fields: string[]) {
|
||||||
const wildcards = fields
|
const wildcards = fields
|
||||||
.filter((field) => field.endsWith('.*'))
|
.filter((field) => field.endsWith('.*'))
|
||||||
.map((field) => field.replace('*', ''));
|
.map((field) => field.replace(/\*/g, ''));
|
||||||
|
|
||||||
return (value: unknown, key: string) => {
|
return (value: unknown, key: string) => {
|
||||||
return fields.includes(key) || wildcards.some((field) => key.startsWith(field));
|
return fields.includes(key) || wildcards.some((field) => key.startsWith(field));
|
||||||
|
|
|
@ -114,7 +114,7 @@ export const createFilterFromOptions = (
|
||||||
filters.push(options.filterQuery);
|
filters.push(options.filterQuery);
|
||||||
}
|
}
|
||||||
if (options.groupBy) {
|
if (options.groupBy) {
|
||||||
const id = series.id.replace('"', '\\"');
|
const id = series.id.replace(/"/g, '\\"');
|
||||||
const groupByFilters = Array.isArray(options.groupBy)
|
const groupByFilters = Array.isArray(options.groupBy)
|
||||||
? options.groupBy
|
? options.groupBy
|
||||||
.map((field, index) => {
|
.map((field, index) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue