Skip to content

Commit 967ac02

Browse files
committed
do not touch case-insensitive
1 parent d9a6a1f commit 967ac02

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-\x7F]/; // Note: U+007F DEL is excluded too.
1919
const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
2020

@@ -389,7 +389,7 @@ const encode = function(input) {
389389
const toUnicode = function(input) {
390390
return mapDomain(input, function(string) {
391391
return regexPunycode.test(string)
392-
? decode(string.slice(4).toLowerCase())
392+
? decode(string.slice(4))
393393
: string;
394394
});
395395
};

0 commit comments

Comments
 (0)