diff --git a/src/core/Utils.mjs b/src/core/Utils.mjs index 273eca1e..fed67553 100755 --- a/src/core/Utils.mjs +++ b/src/core/Utils.mjs @@ -201,9 +201,11 @@ 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) { + 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; switch (b[0]) { + case "\\": + return "\\"; case "0": case "1": case "2":