diff --git a/README.md b/README.md index bd32d00..e51d71a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ whatwg-url is a full implementation of the WHATWG [URL Standard](https://url.spe ## Specification conformance -whatwg-url is currently up to date with the URL spec up to commit [eee49fd](https://github.com/whatwg/url/commit/eee49fdf4f99d59f717cbeb0bce29fda930196d4). +whatwg-url is currently up to date with the URL spec up to commit [ffee2e2](https://github.com/whatwg/url/commit/ffee2e21c7034cc72d813d45dd85637e70bbeeec). For `file:` URLs, whose [origin is left unspecified](https://url.spec.whatwg.org/#concept-url-origin), whatwg-url chooses to use a new opaque origin (which serializes to `"null"`). diff --git a/lib/url-state-machine.js b/lib/url-state-machine.js index 9903392..8c51832 100644 --- a/lib/url-state-machine.js +++ b/lib/url-state-machine.js @@ -325,7 +325,7 @@ function serializeIPv6(address) { return output; } -function parseHost(input, isNotSpecialArg = false) { +function parseHost(input, isOpaque = false) { if (input[0] === "[") { if (input[input.length - 1] !== "]") { return failure; @@ -334,7 +334,7 @@ function parseHost(input, isNotSpecialArg = false) { return parseIPv6(input.substring(1, input.length - 1)); } - if (isNotSpecialArg) { + if (isOpaque) { return parseOpaqueHost(input); }