2
0
mirror of https://github.com/gchq/CyberChef synced 2026-02-27 18:13:17 +00:00

Fix: Move Magic checks from Escape to Unescape Unicode Characters (#2195)

This commit is contained in:
CatCatYu
2026-02-21 01:23:58 +08:00
committed by GitHub
parent 98fb680a92
commit 976c8b2d56
2 changed files with 17 additions and 17 deletions

View File

@@ -44,23 +44,6 @@ class EscapeUnicodeCharacters extends Operation {
"value": true
}
];
this.checks = [
{
pattern: "\\\\u(?:[\\da-f]{4,6})",
flags: "i",
args: ["\\u"]
},
{
pattern: "%u(?:[\\da-f]{4,6})",
flags: "i",
args: ["%u"]
},
{
pattern: "U\\+(?:[\\da-f]{4,6})",
flags: "i",
args: ["U+"]
}
];
}
/**

View File

@@ -30,6 +30,23 @@ class UnescapeUnicodeCharacters extends Operation {
"value": ["\\u", "%u", "U+"]
}
];
this.checks = [
{
pattern: "\\\\u(?:[\\da-f]{4,6})",
flags: "i",
args: ["\\u"]
},
{
pattern: "%u(?:[\\da-f]{4,6})",
flags: "i",
args: ["%u"]
},
{
pattern: "U\\+(?:[\\da-f]{4,6})",
flags: "i",
args: ["U+"]
}
];
}
/**