IDNA cannot fail ASCII domains, even if they start with xn--#60476
Merged
Conversation
This was referenced Jun 8, 2026
webkit-commit-queue
pushed a commit
to annevk/WebKit
that referenced
this pull request
Jun 9, 2026
https://bugs.webkit.org/show_bug.cgi?id=316554 rdar://177686282 Reviewed by Alex Christensen. Unfortunately web compatibility is forcing our hand here to favor pure ASCII inputs, even when ToUnicode cannot do anything meaningful with them. Specification change: whatwg/url#914 Tests: web-platform-tests/wpt#60476 Canonical link: https://commits.webkit.org/314820@main
domenic
reviewed
Jun 10, 2026
domenic
left a comment
Member
There was a problem hiding this comment.
Confirmed matches whatwg/url#914.
annevk
added a commit
to whatwg/url
that referenced
this pull request
Jun 25, 2026
Unfortunately implementing Unicode ToASCII ends up rejecting websites such as - http://xn--72czcrhaj7cpt0ed1dxb4mb1s1.blogspot.com/2018/11/blog-post_60.html - https://xn--8i7caa.famitei.net/sekou/all - https://xn--board-ngr.palungjit.org/members/ which is not really acceptable. So when ToASCII fails, domain is all ASCII, and there are no forbidden domain code points, we just return the lowercased domain. If an implementation does not surface validation errors this is indistinguishable from having an ASCII fast path. We adjust domain to Unicode by returning the input domain unmodified when any error is recorded and remove validation errors as they would have already been reported when creating domain. Tests: web-platform-tests/wpt#60476.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.