Skip to content

Commit

Permalink
[Lens] escape backslash characters in the formula input
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Oct 14, 2024
1 parent c901fec commit 5f09086
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,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 (
Expand Down

0 comments on commit 5f09086

Please sign in to comment.