aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/list
diff options
context:
space:
mode:
authorAien Saidi <aien.saidi@gmail.com>2021-03-30 19:10:23 +0200
committerSascha <GlancingMind@outlook.com>2021-04-07 13:08:26 +0200
commit41ee97a4f6e6b6c5c76d6b3f61fdeda5fbabe053 (patch)
tree501b0f746edf0d314ba8cc2940de3685dc6547bb /webui/src/pages/list
parentd2845605c2152738e37d13b7067fedac91ccf225 (diff)
downloadgit-bug-41ee97a4f6e6b6c5c76d6b3f61fdeda5fbabe053.tar.gz
fix: regex issue
Diffstat (limited to 'webui/src/pages/list')
-rw-r--r--webui/src/pages/list/Filter.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/webui/src/pages/list/Filter.tsx b/webui/src/pages/list/Filter.tsx
index 42375dea..2e99eedf 100644
--- a/webui/src/pages/list/Filter.tsx
+++ b/webui/src/pages/list/Filter.tsx
@@ -35,7 +35,7 @@ function parse(query: string): Query {
const params: Query = {};
// TODO: support escaping without quotes
- const re = /(\w+):([A-Za-z0-9-]+|"([^"]*)")/g;
+ const re = /(\w+):([A-Za-z0-9-]+|(["'])(([^\3]|\\.)*)\3)+/g;
let matches;
while ((matches = re.exec(query)) !== null) {
if (!params[matches[1]]) {
@@ -43,8 +43,8 @@ function parse(query: string): Query {
}
let value;
- if (matches[3]) {
- value = matches[3];
+ if (matches[4]) {
+ value = matches[4];
} else {
value = matches[2];
}