Skip to content

๐Ÿž๐Ÿ”ง ๏ผšpercent-encode room aliases in matrix.to links - #883

Merged
OpenINFbot merged 1 commit into
mainfrom
fix/matrix-to-url-fragment-encoding
Aug 9, 2026
Merged

๐Ÿž๐Ÿ”ง ๏ผšpercent-encode room aliases in matrix.to links#883
OpenINFbot merged 1 commit into
mainfrom
fix/matrix-to-url-fragment-encoding

Conversation

@DerekNonGeneric

Copy link
Copy Markdown
Member

Pull Request Purpose

This PR contains the following:

  • ๐Ÿž๐Ÿ”ง bugfixing (๐Ÿœ/๐ŸฆŸ/๐Ÿ›/๐Ÿฆ—/๐Ÿ et al.)
  • ๐Ÿ†•๐ŸŽ implementation of new feature(s)
  • โ™ป๏ธ refactoring(s)
  • ๐Ÿ“„ documentation modification(s)
  • ๐Ÿ”ฎ other

Testing

  • yes (bugfixes and features will not be merged without tests)
  • no

These are two link reference definitions in Markdown documents; there is no code path to cover. Verified instead with the W3C validator (vnu) against a page built from each form โ€” see below.

Breaking Changes

  • yes (breaking changes will not be merged unless necessary)
  • no

The percent-encoded form resolves to the same rooms.

Description

# is the fragment delimiter, so a second literal # inside a URL fragment is invalid per RFC 3986. Both of our matrix.to links carry one:

file link
SUPPORT.md:44 https://matrix.to/#/#openinf:matrix.org
README.md:252 https://matrix.to/#/#openinf-space:matrix.org

Running the W3C validator over both forms shows only the raw-# one is rejected:

error: Bad value โ€œhttps://matrix.to/#/#openinf:matrix.orgโ€ for attribute โ€œhrefโ€
on element โ€œaโ€: Illegal character in fragment. โ€œ#โ€ is not allowed.

The percent-encoded variant produces no diagnostic, and it is also what the Matrix spec asks for โ€” matrix.to URI components "MUST be percent-encoded as per RFC 3986", with https://matrix.to/#/%23somewhere:example.org given as the canonical form. (The spec also notes clients should parse the unencoded form leniently, which is why these links still work today despite being invalid.)

Why this matters beyond tidiness: SUPPORT.md is imported into openinf.github.io by its compile.siteifyHealthFiles task, which renders it to /docs/dev/faq/support. That site's verify.htmlValidForVNU task now validates every built page rather than only the home page, and this URL is the one remaining error failing it. Since the imported copy is regenerated from this repository, the fix has to land here to hold.

README.md has the same defect in a different room alias and is corrected alongside it โ€” happy to drop that hunk if you would rather keep this PR to the single downstream-blocking file.

List of any relevant issue numbers: none

`#` is the fragment delimiter, so a second literal `#` inside the
fragment is invalid per RFC 3986; the W3C validator rejects
https://matrix.to/#/#openinf:matrix.org with "Illegal character in
fragment". The Matrix spec asks for the same thing, requiring that
matrix.to URI components "MUST be percent-encoded as per RFC 3986"
and giving %23somewhere:example.org as the canonical form.

SUPPORT.md is the copy that matters downstream: openinf.github.io
imports it through its siteifyHealthFiles task, and the invalid URL
fails that site's vnu validation. README.md carries the same defect
and is fixed alongside it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@DerekNonGeneric DerekNonGeneric changed the title ๐Ÿž๐Ÿ”ง Percent-encode room aliases in matrix.to links ๐Ÿž๐Ÿ”ง ๏ผšpercent-encode room aliases in matrix.to links Aug 9, 2026
@OpenINFbot
OpenINFbot merged commit 2f1618a into main Aug 9, 2026
4 of 6 checks passed
@OpenINFbot
OpenINFbot deleted the fix/matrix-to-url-fragment-encoding branch August 9, 2026 22:48
DerekNonGeneric added a commit to OpenINF/openinf.github.io that referenced this pull request Aug 10, 2026
First run since OpenINF/.github#883, #884, and #885 landed, so this
picks up the percent-encoded matrix.to aliases, the absolute
cross-document links, and the promoted heading levels.

Each page is now its upstream file unchanged but for the frontmatter
and the title heading the layout renders in its place.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

2 participants