mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Lens] escape backslash characters in the formula input (#196176)
Ensures that backslashes are properly escaped in addition to single quotes in formula
This commit is contained in:
parent
d822c6ecc8
commit
44410737f8
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ export function generateFormula(
|
|||
}
|
||||
previousFormula +=
|
||||
(previousColumn.filter.language === 'kuery' ? 'kql=' : 'lucene=') +
|
||||
`'${previousColumn.filter.query.replace(/'/g, `\\'`)}'`; // replace all
|
||||
`'${previousColumn.filter.query.replace(/\\/g, '\\\\').replace(/'/g, `\\'`)}'`; // replace all
|
||||
}
|
||||
if (previousColumn.timeShift) {
|
||||
if (previousColumn.operationType !== 'count' || previousColumn.filter) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue