{"action":"created","issue":{"url":"https://api.github.com/repos/validator/validator/issues/445","repository_url":"https://api.github.com/repos/validator/validator","labels_url":"https://api.github.com/repos/validator/validator/issues/445/labels{/name}","comments_url":"https://api.github.com/repos/validator/validator/issues/445/comments","events_url":"https://api.github.com/repos/validator/validator/issues/445/events","html_url":"https://github.com/validator/validator/issues/445","id":201126707,"number":445,"title":"Some of the URLs used in href-isvalid.html are invalid","user":{"login":"dd8","id":16352274,"avatar_url":"https://avatars.githubusercontent.com/u/16352274?v=3","gravatar_id":"","url":"https://api.github.com/users/dd8","html_url":"https://github.com/dd8","followers_url":"https://api.github.com/users/dd8/followers","following_url":"https://api.github.com/users/dd8/following{/other_user}","gists_url":"https://api.github.com/users/dd8/gists{/gist_id}","starred_url":"https://api.github.com/users/dd8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dd8/subscriptions","organizations_url":"https://api.github.com/users/dd8/orgs","repos_url":"https://api.github.com/users/dd8/repos","events_url":"https://api.github.com/users/dd8/events{/privacy}","received_events_url":"https://api.github.com/users/dd8/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-01-16T21:54:40Z","updated_at":"2017-01-20T04:27:48Z","closed_at":null,"body":"... according to the current version of the URL Standard. There's been a bit of spec churn here related to file: URLs and @ signs in the authority section.\r\n\r\nAffected files include this one, and the others generated by url.py:\r\nhttps://github.com/validator/tests/blob/master/html/elements/a/href-isvalid.html\r\n\r\n    <a href=\"file:test\"></a><!-- scheme-file-no-slash -->\r\n    <a href=\"file:/\"></a><!-- scheme-file-slash-only -->\r\n    <a href=\"file:/example.com/\"></a><!-- scheme-file-single-slash -->\r\n    <a href=\"file:\"></a><!-- scheme-file-scheme-only -->\r\n\r\nThese are all flagged as syntax violations by URL Standard parsing algorithm, because they don't start with file://. The standard currently says this:\r\n\r\n4.2 URL Parsing\r\nscheme state\r\n1. If c is an ASCII alphanumeric, \"+\", \"-\", or \".\", append c, lowercased, to buffer. \r\n2. Otherwise, if c is \":\", run these substeps: \r\n    2.1 If state override is given, run these subsubsteps:\r\n        2.1.1 If url’s scheme is a special scheme and buffer is not, terminate this algorithm.\r\n        2.1.2 If url’s scheme is not a special scheme and buffer is, terminate this algorithm.\r\n    2.2. Set url’s scheme to buffer.\r\n    2.3. Set buffer to the empty string.\r\n    2.4. If state override is given, terminate this algorithm.\r\n    2.5. If url’s scheme is \"file\", run these subsubsteps:\r\n        2.4.1 If remaining does not start with \"//\", syntax violation.\r\n\r\nState override is only used by setters for URL APIs (e.g. url.Pathname = \"/foo\")\r\n\r\nAlso looks like file:///C|/foo/bar is now a syntax violation:\r\nhttps://github.com/whatwg/url/issues/209\r\n"},"comment":{"url":"https://api.github.com/repos/validator/validator/issues/comments/273974879","html_url":"https://github.com/validator/validator/issues/445#issuecomment-273974879","issue_url":"https://api.github.com/repos/validator/validator/issues/445","id":273974879,"user":{"login":"sideshowbarker","id":194984,"avatar_url":"https://avatars.githubusercontent.com/u/194984?v=3","gravatar_id":"","url":"https://api.github.com/users/sideshowbarker","html_url":"https://github.com/sideshowbarker","followers_url":"https://api.github.com/users/sideshowbarker/followers","following_url":"https://api.github.com/users/sideshowbarker/following{/other_user}","gists_url":"https://api.github.com/users/sideshowbarker/gists{/gist_id}","starred_url":"https://api.github.com/users/sideshowbarker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sideshowbarker/subscriptions","organizations_url":"https://api.github.com/users/sideshowbarker/orgs","repos_url":"https://api.github.com/users/sideshowbarker/repos","events_url":"https://api.github.com/users/sideshowbarker/events{/privacy}","received_events_url":"https://api.github.com/users/sideshowbarker/received_events","type":"User","site_admin":false},"created_at":"2017-01-20T04:27:48Z","updated_at":"2017-01-20T04:27:48Z","body":"Considering my previous comments a little more carefully: The tests in https://github.com/validator/tests are just copies of tests at https://github.com/w3c/web-platform-tests/tree/master/conformance-checkers, which in turn are generated from https://github.com/w3c/web-platform-tests/blob/master/conformance-checkers/tools/url.py, which in turn are based on sources in https://github.com/w3c/web-platform-tests/tree/master/url (though incidentally we should probably update https://github.com/w3c/web-platform-tests/blob/master/conformance-checkers/tools/url.py to align with changes/additions to /url wpt sources).\r\n\r\nGiven that, to get back specifically to the following question:\r\n\r\n> Would it be worth specifying `<base href=\"http://example.com\">` or similar in the test files to avoid this?\r\n\r\nWe could make that change in the https://github.com/w3c/web-platform-tests/tree/master/conformance-checkers sources without @annevk necessarily needing to make any changes to https://github.com/w3c/web-platform-tests/tree/master/url\r\n\r\nEspecially if you were to raise a PR against https://github.com/w3c/web-platform-tests/blob/master/conformance-checkers/tools/url.py for doing that, I would be happy to review it. \r\n"}}
{"actor":{"display_login":"sideshowbarker"}}