mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 18:40:34 -05:00
fix Tag filtering crashing app when tag has regex special character (#3725)
* fix Tag filtering crashing app when tag has regex special character * release-notes --------- Co-authored-by: Joel Rich <joelrich@protonmail.com>
This commit is contained in:
@@ -468,7 +468,9 @@ export function conditionsToAQL(conditions, { recurDateBounds = 100 } = {}) {
|
||||
|
||||
return {
|
||||
$and: tagValues.map(v => {
|
||||
const regex = new RegExp(`(^|\\s)${v}(\\s|$)`);
|
||||
const regex = new RegExp(
|
||||
`(^|\\s)${v.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}(\\s|$)`,
|
||||
);
|
||||
return apply(field, '$regexp', regex.source);
|
||||
}),
|
||||
};
|
||||
|
||||
6
upcoming-release-notes/3725.md
Normal file
6
upcoming-release-notes/3725.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [joel-rich]
|
||||
---
|
||||
|
||||
fix Tag filtering crashing app when tag has regex special character
|
||||
Reference in New Issue
Block a user