[PR #7940] Hash the URI as part of the hyperlink ID #27036

Open
opened 2026-01-31 09:19:37 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/7940

State: closed
Merged: Yes


It turns out that we missed part of the OSC 8 spec which indicated that
hyperlinks with the same ID but different URIs are logically distinct.

Character cells that have the same target URI and the same nonempty id
are always underlined together on mouseover.
The same id is only used for connecting character cells whose URIs is
also the same. Character cells pointing to different URIs should never
be underlined together when hovering over.

This pull request fixes that oversight by appending the (hashed) URI to
the generated ID.

When Terminal receives one of these links over ConPTY, it will hash the
URL a second time and therefore append a second hashed ID. This is taken
as an acceptable cost.

Fixes #7698

**Original Pull Request:** https://github.com/microsoft/terminal/pull/7940 **State:** closed **Merged:** Yes --- It turns out that we missed part of the OSC 8 spec which indicated that _hyperlinks with the same ID but different URIs are logically distinct._ > Character cells that have the same target URI and the same nonempty id > are always underlined together on mouseover. > The same id is only used for connecting character cells whose URIs is > also the same. Character cells pointing to different URIs should never > be underlined together when hovering over. This pull request fixes that oversight by appending the (hashed) URI to the generated ID. When Terminal receives one of these links over ConPTY, it will hash the URL a second time and therefore append a second hashed ID. This is taken as an acceptable cost. Fixes #7698
claunia added the pull-request label 2026-01-31 09:19:37 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27036