1
0
mirror of synced 2025-01-31 12:03:42 +01:00

Merge branch 'backslash' of https://github.com/wh0/CyberChef into wh0-backslash

This commit is contained in:
n1474335 2019-10-16 16:47:01 +01:00
commit 562171ec86

View File

@ -201,8 +201,7 @@ class Utils {
* Utils.parseEscapedChars("\\n");
*/
static parseEscapedChars(str) {
return str.replace(/(\\)?\\([bfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g, function(m, a, b) {
if (a === "\\") return "\\"+b;
return str.replace(/\\([bfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g, function(m, b) {
switch (b[0]) {
case "\\":
return "\\";