You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ function isIdnHostname(hostname) {
104
104
// hyphen rules (the other one is covered by bidi)
105
105
if(label.indexOf('--')===2)throwIdnaSyntaxError('Label cannot contain consecutive hyphen-minus in the 3rd and 4th positions (RFC 5891 §4.2.3.1).');
106
106
// leading combining marks check (some are not covered by bidi)
107
-
if(/^\p{M}$/u.test(label.charAt(0)))throwIdnaSyntaxError(`Label cannot begin with combining/enclosing mark ${cpHex(label.codePointAt(0))} (RFC 5891 §4.2.3.2).`);
107
+
if(/^\p{M}$/u.test(String.fromCodePoint(label.codePointAt(0))))throwIdnaSyntaxError(`Label cannot begin with combining/enclosing mark ${cpHex(label.codePointAt(0))} (RFC 5891 §4.2.3.2).`);
0 commit comments