Skip to content

Commit

Permalink
Stop special casing U+0000 in parse fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk authored Apr 27, 2020
1 parent c3acf80 commit e7db4a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion scripts/get-latest-platform-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
5 changes: 1 addition & 4 deletions src/url-state-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]) ||
Expand Down

0 comments on commit e7db4a4

Please sign in to comment.