Support Unicode characters in tags
This commit is contained in:
1 parent
dfab724515
commit
c52ff6f6ec
7 files changed
+48
-40
No files matched your search
+2
-1
@@ -19,6 +19,7 @@
|
||||
|
||||
import config from "./config";
|
||||
import { Expression } from "../lib/types";
|
||||
import { encodeTag } from "../lib/common";
|
||||
|
||||
const resources = {
|
||||
devices: {},
|
||||
@@ -138,7 +139,7 @@ function queryMac(param, value): Expression {
|
||||
}
|
||||
|
||||
function queryTag(tag: string): Expression {
|
||||
const t = tag.replace(/[^a-zA-Z0-9-]+/g, "_");
|
||||
const t = encodeTag(tag);
|
||||
return ["IS NOT NULL", ["PARAM", `Tags.${t}`]];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user