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 Dec 29, 2016
1 parent 9096654 commit bf029a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
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 = "5be497b5f5a7036e26dc14739aa8d42f643cf94f";
const commitHash = "d179f7eadbe83a6fa9bf7ee85c2de440b8c6dc7d";

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 @@ -975,14 +975,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 bf029a6

Please sign in to comment.