Skip to content

Commit

Permalink
Spec update: stop decoding all %2es in paths
Browse files Browse the repository at this point in the history
This follows whatwg/url#156.
  • Loading branch information
domenic committed Jan 3, 2017
1 parent 7d80c7d commit 5f3e2d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ whatwg-url is a full implementation of the WHATWG [URL Standard](https://url.spe

## Current Status

whatwg-url is currently up to date with the URL spec up to commit [5e0b05](https://github.com/whatwg/url/tree/5e0b05e95a81fdd539c7b1bf97e69b3df701384f).
whatwg-url is currently up to date with the URL spec up to commit [fbff68](https://github.com/whatwg/url/tree/fbff6834a8a03576261f777d0e0afea5c1bc5a09).

## API

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 @@ -15,7 +15,7 @@ const request = require("request");
// 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 = "e0012406859014e8f31dbaf12122d0cd10249db4";
const commitHash = "d93247d5cb7d70f80da8b154a171f4e3d50969f4";

const sourceURL = `https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}/url/urltestdata.json`;
const setterSourceURL = `https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}/url/setters_tests.json`;
Expand Down
9 changes: 1 addition & 8 deletions src/url-state-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -976,14 +976,7 @@ URLStateMachine.prototype["parse path"] = function parsePath(c) {
this.parseError = true;
}

if (c === p("%") &&
this.input[this.pointer + 1] === p("2") &&
(this.input[this.pointer + 2] === p("e") || this.input[this.pointer + 2] === p("E"))) {
this.buffer += ".";
this.pointer += 2;
} else {
this.buffer += encodeChar(c, isDefaultEncode);
}
this.buffer += encodeChar(c, isDefaultEncode);
}

return true;
Expand Down

0 comments on commit 5f3e2d2

Please sign in to comment.