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 34de6b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 4 additions & 0 deletions scripts/get-latest-platform-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ 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
<<<<<<< HEAD
const commitHash = "e0012406859014e8f31dbaf12122d0cd10249db4";
=======
const commitHash = "d179f7eadbe83a6fa9bf7ee85c2de440b8c6dc7d";
>>>>>>> Spec update: stop decoding all %2es in paths

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 34de6b0

Please sign in to comment.