Skip to content

Commit

Permalink
Fix code scanning alert no. 494: Incomplete string escaping or encodi…
Browse files Browse the repository at this point in the history
  • Loading branch information
fkanout authored and JoseLuisGJ committed Dec 19, 2024
1 parent dcc9ed1 commit c6a8280
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const getLensOperationFromRuleMetric = (metric: GenericMetric): LensOpera
const { aggType, field, filter = '' } = metric;
let operation: string = aggType;
const operationArgs: string[] = [];
const escapedFilter = filter.replace(/'/g, "\\'");
const escapedFilter = filter.replace(/\\/g, '\\\\').replace(/'/g, "\\'");

if (aggType === Aggregators.RATE) {
return {
Expand Down

0 comments on commit c6a8280

Please sign in to comment.