Allow any number of digits when killing \u{} sequences in regexps

This commit is contained in:
Marijn Haverbeke 2015-03-12 22:26:31 +01:00
parent 4735ef53ef
commit 811d19ab76

View File

@ -1082,7 +1082,7 @@
// ASCII symbol to avoid throwing on regular expressions that
// are only valid in combination with the `/u` flag.
tmp = tmp
.replace(/\\u\{([0-9a-fA-F]{5,6})\}/g, "x")
.replace(/\\u\{([0-9a-fA-F]+)\}/g, "x")
.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x");
}
}