Skip to content

Commit e7db4a4

Browse files
authored
Stop special casing U+0000 in parse fragment
Follows whatwg/url#486.
1 parent c3acf80 commit e7db4a4

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ This module exports the `URL` and `URLSearchParams` [interface wrappers API](htt
7777

7878
First, install [Node.js](https://nodejs.org/). Then, fetch the dependencies of whatwg-url, by running from this directory:
7979

80-
npm
80+
npm install
8181

8282
To run tests:
8383

scripts/get-latest-platform-tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ process.on("unhandledRejection", err => {
2323
// 1. Go to https://github.com/w3c/web-platform-tests/tree/master/url
2424
// 2. Press "y" on your keyboard to get a permalink
2525
// 3. Copy the commit hash
26-
const commitHash = "9b7ab1c11b7e0cf9b43ea6dbb282c33e4d193726";
26+
const commitHash = "efec8204e84d434d80407bb7cf8df37d33cabaa1";
2727

2828
const urlPrefix = `https://raw.githubusercontent.com/web-platform-tests/wpt/${commitHash}/url/`;
2929
const targetDir = path.resolve(__dirname, "..", "test", "web-platform-tests");

src/url-state-machine.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,10 +1154,7 @@ URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) {
11541154
};
11551155

11561156
URLStateMachine.prototype["parse fragment"] = function parseFragment(c) {
1157-
if (isNaN(c)) { // do nothing
1158-
} else if (c === 0x0) {
1159-
this.parseError = true;
1160-
} else {
1157+
if (!isNaN(c)) {
11611158
// TODO: If c is not a URL code point and not "%", parse error.
11621159
if (c === p("%") &&
11631160
(!infra.isASCIIHex(this.input[this.pointer + 1]) ||

0 commit comments

Comments
 (0)