Skip to content

fix: encode invalid host characters - #223

Merged
mcollina merged 1 commit into
mainfrom
fix/encode-invalid-host-characters
Sep 30, 2026
Merged

mcollina merged 1 commit into
mainfrom
fix/encode-invalid-host-characters

Conversation

@mcollina

Copy link
Copy Markdown
Member

Encode generic URI hosts using the RFC 3986 reg-name grammar instead of escaping only authority delimiters. This preserves validated IP literals and Unicode IRI behavior while percent-encoding controls and other characters that cannot appear literally in a host.

Add coverage for C0 controls, spaces, forbidden ASCII characters, percent escapes, URI/IRI Unicode handling, normalization, and resolution.

@Tony133 Tony133 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Worth a line in the release notes: non-ASCII hosts in schemes without unicodeSupport are now percent-encoded (custom://ré/ → custom://r%C3%A9/).

@gurgunday
gurgunday requested a review from zekth September 30, 2026 15:04
@mcollina
mcollina merged commit 9da8b0a into main Sep 30, 2026
44 checks passed
@mcollina
mcollina deleted the fix/encode-invalid-host-characters branch September 30, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants