Skip to content

Make relative-URL-with-fragment string account for opaque-path base URLs - #920

Merged
annevk merged 1 commit into
mainfrom
annevk/relative-url-validity
Jul 1, 2026
Merged

Make relative-URL-with-fragment string account for opaque-path base URLs#920
annevk merged 1 commit into
mainfrom
annevk/relative-url-validity

Conversation

@annevk

@annevk annevk commented Jun 30, 2026

Copy link
Copy Markdown
Member

a/b against foo:opaque was considered valid by the writing section, but the parser would reject it. Now the writing section makes it clear it won't work.

Helps with #704.


Preview | Diff

a/b against foo:opaque was considered valid by the writing section, but the parser would reject it. Now the writing section makes it clear it won't work.

Helps with #704.
@annevk
annevk requested a review from domenic June 30, 2026 14:12
@annevk annevk added the topic: validation Pertaining to the rules for URL writing and validity (as opposed to parsing) label Jun 30, 2026
domenic added a commit to jsdom/whatwg-url that referenced this pull request Jul 1, 2026
Reject relative URL strings with non-empty pre-fragment content when the base URL has an opaque path.

Keep fragment-only strings valid by validating the optional fragment separately before applying the opaque-path base rule.

Add coverage for foo:opaque bases, including the a/b case from whatwg/url#920.

Co-Authored-By: codex <codex@openai.com>
domenic added a commit to jsdom/whatwg-url that referenced this pull request Jul 1, 2026
Follows whatwg/url#920.

Co-authored-by: codex <codex@openai.com>
@annevk
annevk merged commit 24deb59 into main Jul 1, 2026
2 checks passed
@annevk
annevk deleted the annevk/relative-url-validity branch July 1, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: validation Pertaining to the rules for URL writing and validity (as opposed to parsing)

Development

Successfully merging this pull request may close these issues.

2 participants