-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL: stripping of tab and newlines in setters #23265
Conversation
This does not match jsdom/whatwg-url in several ways. I'll collate them here, then we can dig into whether they're implementation issues or test issues...
and then the last one again for U+000A, U+000D, and all three cases again for password |
This test is incorrect. https://url.spec.whatwg.org/#fragment-state does a validation error, and then does nothing, for U+0000 |
These also appear to be incorrect. E.g. https://url.spec.whatwg.org/#dom-url-username goes to https://url.spec.whatwg.org/#set-the-username which percent-encodes using https://url.spec.whatwg.org/#userinfo-percent-encode-set which includes U+0009, U+000A, U+000D. |
Well, OK, I think this is correct now that the latest spec changes have landed :). |
I could have sworn I made an intermediate commit for trailing stuff before adding non-special scheme support. Oh well. @domenic want to verify again? This now is about as exhaustive as I imagined it. Trailing caught new failures, non-special scheme only caught failures in implementations that don't have good support for those anyway. |
I'm now getting a lot of failures in the "Setting protocol with trailing X" tests. The setters change the result in whatwg-url but the test expects them to stay unchanged. I don't see any reason why the protocol would stay unchanged. Note that step 3 of basic URL parse removes all ASCII tab and newline from the input, not just trailing/leading ones. Also, if you wouldn't mind rebasing this on master, that would help me testing a bit. |
c972dc3
to
c0d8a84
Compare
Thanks for highlighting that! I should also add a "middle" variant then. |
The latest commit (c0d8a84) passes entirely with whatwg-url. Happy to test again if you add a middle variant. |
The middle variant found port setter bugs in Safari, provided I did it correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still passes
Following the specification that allows using `\x00` in the hash. Related: web-platform-tests/wpt#23265
For whatwg/url#419.