Skip to content

Commit 766be66

Browse files
committed
do not touch case-insensitive
1 parent a2fd29a commit 766be66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

punycode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const initialN = 128; // 0x80
1414
const delimiter = '-'; // '\x2D'
1515

1616
/** Regular expressions */
17-
const regexPunycode = /^xn--/;
17+
const regexPunycode = /^xn--/i;
1818
const regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
1919
const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
2020

@@ -386,7 +386,7 @@ const encode = function(input) {
386386
const toUnicode = function(input) {
387387
return mapDomain(input, function(string) {
388388
return regexPunycode.test(string)
389-
? decode(string.slice(4).toLowerCase())
389+
? decode(string.slice(4))
390390
: string;
391391
});
392392
};

0 commit comments

Comments
 (0)