Skip to content

fix: preserve HTTP(S) URL semantics - #2446

Merged
markdumay merged 2 commits into
mainfrom
fix/http-scheme-handling
Dec 3, 2026
Merged

markdumay merged 2 commits into
mainfrom
fix/http-scheme-handling

Conversation

@markdumay

Copy link
Copy Markdown
Collaborator

Summary

  • Classify absolute HTTP(S) URLs case-insensitively in navbar, timeline and sidebar links. Preserve the external destination, including escaped paths, queries and fragments.
  • Resolve same-origin links within the configured site base. Decode names for static-file lookup and keep the original escaping when rendering the URL.
  • Keep a failed remote SVG fetch out of the local filesystem fallback. Preserve its URL and the current strict-mode diagnostic.
  • Reject HTTP(S) downloads before checking for a static file.

Refs #2340. Part of #2383.

Verification

  • Seven HTTP(S) regression tests on Hugo 0.170.1 and 0.158.0. They exercise the root and a subpath, static filenames with spaces, both download renderers, and a real failed SVG request.
  • Full repository test suite, mod-docs production examples on both versions, and the example warning gate.
  • Chromium and WebKit verified the absolute timeline link at desktop and mobile widths. The production preview fixture is at /en/http-schemes/.
  • Fresh item and integration review passed. Independent mutations reproduced the cross-host double-slash case and the uppercase timeline misrouting.

Reverting this change restores the prior URL handling. Consumer verification remains grouped with the final stabilization release. Preview acceptance and release approval are pending.

Keep absolute navigation destinations intact, resolve same-site paths
within the configured base, and keep remote SVG and download URLs out
of local file lookup.

Refs #2340
Preserve an absolute address when removing the configured base path
would create a protocol-relative reference to a different host.

Refs #2340
@netlify

netlify Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for gethinode-demo ready!

Name Link
🔨 Latest commit 1dcae98
🔍 Latest deploy log https://app.netlify.com/projects/gethinode-demo/deploys/6b116c796dc24ce587f43700
😎 Deploy Preview https://deploy-preview-2446--gethinode-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@markdumay
markdumay merged commit 682d8ff into main Dec 3, 2026
14 of 15 checks passed
@markdumay

Copy link
Copy Markdown
Collaborator Author

🎉 This PR is included in version 3.54.23 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant