[PATCH himitsu] himitsu::query: allow '[' and ']' in keys
Export this patch
---
It looks kind of ugly, but works
himitsu/query/parse.ha | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/himitsu/query/parse.ha b/himitsu/query/parse.ha
index 12ef57f..a936042 100644
--- a/himitsu/query/parse.ha
+++ b/himitsu/query/parse.ha
@@ -9,7 +9,8 @@ use fmt;
let keyre: regex::regex = regex::regex { ... };
@init fn init() void = {
- keyre = regex::compile(`^[-_A-Za-z]+$`)!;
+ // Yes, this is a valid POSIX regular expression
+ keyre = regex::compile(`^[]A-Za-z-_[]+$`)!;
};
@fini fn fini() void = {
--
2.36.1
I would prefer to actually fix this by allowing arbitrary shell-quoted
strings in keys.