tldts 7.0.31 → 7.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -342,10 +342,10 @@ function isValidHostname (hostname) {
|
|
|
342
342
|
i - lastDotIndex > 64 ||
|
|
343
343
|
// Check that previous character was not already a '.'
|
|
344
344
|
lastCharCode === 46 ||
|
|
345
|
-
// Check that the previous label does not end with
|
|
346
|
-
|
|
347
|
-
//
|
|
348
|
-
lastCharCode ===
|
|
345
|
+
// Check that the previous label does not end with '-' (RFC 1035 §2.3.1 LDH).
|
|
346
|
+
// '_' is intentionally NOT restricted: DNS allows any octet (RFC 2181 §11) and
|
|
347
|
+
// WHATWG URL does not treat '_' as a forbidden host code point.
|
|
348
|
+
lastCharCode === 45) {
|
|
349
349
|
return false;
|
|
350
350
|
}
|
|
351
351
|
lastDotIndex = i;
|