diff --git a/README.md b/README.md index 9555ae7..49e3dd2 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ This module exports the `URL` and `URLSearchParams` [interface wrappers API](htt First, install [Node.js](https://nodejs.org/). Then, fetch the dependencies of whatwg-url, by running from this directory: - npm + npm install To run tests: diff --git a/scripts/get-latest-platform-tests.js b/scripts/get-latest-platform-tests.js index f9744fb..3bd1904 100644 --- a/scripts/get-latest-platform-tests.js +++ b/scripts/get-latest-platform-tests.js @@ -23,7 +23,7 @@ process.on("unhandledRejection", err => { // 1. Go to https://github.com/w3c/web-platform-tests/tree/master/url // 2. Press "y" on your keyboard to get a permalink // 3. Copy the commit hash -const commitHash = "9b7ab1c11b7e0cf9b43ea6dbb282c33e4d193726"; +const commitHash = "efec8204e84d434d80407bb7cf8df37d33cabaa1"; const urlPrefix = `https://raw.githubusercontent.com/web-platform-tests/wpt/${commitHash}/url/`; const targetDir = path.resolve(__dirname, "..", "test", "web-platform-tests"); diff --git a/src/url-state-machine.js b/src/url-state-machine.js index adc2b1f..f2bfd42 100644 --- a/src/url-state-machine.js +++ b/src/url-state-machine.js @@ -1154,10 +1154,7 @@ URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { }; URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { - if (isNaN(c)) { // do nothing - } else if (c === 0x0) { - this.parseError = true; - } else { + if (!isNaN(c)) { // TODO: If c is not a URL code point and not "%", parse error. if (c === p("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) ||