Skip to content

Commit

Permalink
Spec update: forbid <, >, and ^ in hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed May 14, 2020
1 parent 3b7677a commit 5a01b03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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 @@ -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 = "c390f441840c65b55f014a34ef0459853709286b";
const commitHash = "b4e59c1dbb2dfdb2579abd2aab2e43b2edab05d3";

const urlPrefix = `https://raw.githubusercontent.com/web-platform-tests/wpt/${commitHash}/url/`;
const targetDir = path.resolve(__dirname, "..", "test", "web-platform-tests");
Expand Down
4 changes: 2 additions & 2 deletions src/url-state-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ function isNormalizedWindowsDriveLetterString(string) {
}

function containsForbiddenHostCodePoint(string) {
return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1;
return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|<|>|\?|@|\[|\\|\]|\^/) !== -1;
}

function containsForbiddenHostCodePointExcludingPercent(string) {
return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1;
return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^/) !== -1;
}

function isSpecialScheme(scheme) {
Expand Down

0 comments on commit 5a01b03

Please sign in to comment.