Skip to content

Commit

Permalink
Update for whatwg/url#77
Browse files Browse the repository at this point in the history
This will cause the tests to fail until web-platform-tests/wpt#2500 is merged.
  • Loading branch information
domenic committed Jan 19, 2016
1 parent 3675cb2 commit 4e2f5a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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 [99a85f](https://github.com/whatwg/url/tree/99a85f77e0edf2bcc9f73183eba6c50ef9706ded).
whatwg-url is currently up to date with the URL spec up to commit [af76ff](https://github.com/whatwg/url/commit/af76ff3aa15be6310b9408d416854c2370175a8f).

## API

Expand Down
12 changes: 10 additions & 2 deletions src/url-state-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -942,14 +942,22 @@ URLStateMachine.prototype["parse" + "path"] =
} else if (c === 0x9 || c === 0xA || c === 0xD) {
this.parse_error = true;
} else {
//TODO:If c is not a URL code point and not "%", parse error.
// TODO: If c is not a URL code point and not "%", parse error.

if (c === p("%") &&
(!isASCIIHex(this.input[this.pointer + 1]) ||
!isASCIIHex(this.input[this.pointer + 2]))) {
this.parse_error = true;
}

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

Expand Down

0 comments on commit 4e2f5a5

Please sign in to comment.