Fix: Move Magic checks from Escape to Unescape Unicode Characters (#2195)
Some checks failed
Master Build, Test & Deploy / main (push) Has been cancelled

This commit is contained in:
CatCatYu 2026-02-21 01:23:58 +08:00 committed by GitHub
parent 98fb680a92
commit 976c8b2d56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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+"]
}
];
}
/**