Forbid < and > in URL hosts
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Jan 2018 23:38:26 +0000 (23:38 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Jan 2018 23:38:26 +0000 (23:38 +0000)
commitc52f7f7523bddd583a76ecc95096a5844a81db13
treee52ce6c5b770aabeee61375a96bc9b6a48a6f08a
parentc3149d656f3ef197e7e6deae71dab88b730b0603
Forbid < and > in URL hosts
https://bugs.webkit.org/show_bug.cgi?id=181308
<rdar://problem/36012757>

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-origin-expected.txt:
* web-platform-tests/url/a-element-origin-xhtml-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/url-constructor-expected.txt:
* web-platform-tests/url/url-origin-expected.txt:

Source/WebCore:

https://url.spec.whatwg.org/#forbidden-host-code-point does not include these characters yet, but I think it should.
Firefox fails to parse URLs with < or > in the host.  Chrome percent encodes them.  Safari needs to do something.
The web platform tests are unclear on this case, and they will need to be updated with the specification.
They do show a change in behavior, though.

* platform/URLParser.cpp:
Add < and > to the list of forbidden host code points.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/a-element-origin-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/a-element-origin-xhtml-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/url-origin-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/URLParser.cpp