From 94745c71348cebf06eae5dadc13afa8c81946fca Mon Sep 17 00:00:00 2001 From: Kim Brose <2803622+HarHarLinks@users.noreply.github.com> Date: Wed, 10 Jun 2026 14:18:14 +0200 Subject: [PATCH] Clarify matrix.to RFC 3986 percent encoding requirements --- content/appendices.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/content/appendices.md b/content/appendices.md index 703dd051..8f047531 100644 --- a/content/appendices.md +++ b/content/appendices.md @@ -894,14 +894,22 @@ room alias, the client may open a view for the user to participate in the room. The components of the matrix.to URI (`` and -``) are to be percent-encoded as per RFC 3986. +``) MUST be percent-encoded as per RFC 3986. Examples of matrix.to URIs are: +* Link to `#somewhere:example.org`: `https://matrix.to/#/%23somewhere:example.org` +* Link to `!somewhere:example.org`: `https://matrix.to/#/!somewhere:example.org?via=elsewhere.ca` +* Link to `$event` in `!somewhere:example.org`: `https://matrix.to/#/!somewhere:example.org/$event:example.org?via=elsewhere.ca` +* Link to `@alice:example.org`: `https://matrix.to/#/@alice:example.org` + +Note that encoding of characters is REQUIRED by RFC 3986 when they could otherwise be misinterpreted, and OPTIONAL for any other character. +Hence the following encoding is also valid: + * Link to `#somewhere:example.org`: `https://matrix.to/#/%23somewhere%3Aexample.org` -* Link to `!somewhere:example.org`: `https://matrix.to/#/!somewhere%3Aexample.org?via=elsewhere.ca` -* Link to `$event` in `!somewhere:example.org`: `https://matrix.to/#/!somewhere%3Aexample.org/%24event%3Aexample.org?via=elsewhere.ca` +* Link to `!somewhere:example.org`: `https://matrix.to/#/%21somewhere%3Aexample.org?via=elsewhere.ca` +* Link to `$event` in `!somewhere:example.org`: `https://matrix.to/#/%21somewhere%3Aexample.org/%24event%3Aexample.org?via=elsewhere.ca` * Link to `@alice:example.org`: `https://matrix.to/#/%40alice%3Aexample.org` {{% boxes/note %}}