Fix doubled URLs when |host filter receives absolute URLs

_join_url_parts() only checked the first segment for a scheme, so
passing an already-absolute URL (e.g. from cart_url()) through the
|host filter would join route_prefix() + absolute URL, producing
"https://host/https://host/path/".

Now detects schemes in later segments and resets the base.

Also add missing 'market' entry to _nav.html _app_slugs to match
_nav_oob.html — without it the market menu item fell through to
coop_url('/market/') instead of market_url('/').

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-18 11:45:28 +00:00
parent d1621b8e70
commit 4d00ba3dbe
2 changed files with 7 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
{% set _app_slugs = {'cart': cart_url('/')} %}
{% set _app_slugs = {'market': market_url('/'), 'cart': cart_url('/')} %}
<div class="flex flex-col sm:flex-row sm:items-center gap-2 border-r border-stone-200 mr-2 sm:max-w-2xl"
id="menu-items-nav-wrapper">
{% from 'macros/scrolling_menu.html' import scrolling_menu with context %}