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 eb9958a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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

## Specification conformance

whatwg-url is currently up to date with the URL spec up to commit [e5b1dd7](https://github.com/whatwg/url/commit/e5b1dd76df13183b7f123d15880dbdc6a2f37c71).
whatwg-url is currently up to date with the URL spec up to commit [302ba41](https://github.com/whatwg/url/commit/302ba419cb3248568243aaf7b5aca9003694d5c3).

For `file:` URLs, whose [origin is left unspecified](https://url.spec.whatwg.org/#concept-url-origin), whatwg-url chooses to use a new opaque origin (which serializes to `"null"`).

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 @@ -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 = "9ffe8f26432649d02eb81add2816dd5394f57a8c";

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 eb9958a

Please sign in to comment.