From 9b1750e0ea44517b8455133611c2a379625a0758 Mon Sep 17 00:00:00 2001 From: bb2 <23148629+bb2@users.noreply.github.com> Date: Thu, 21 May 2026 19:24:12 +0800 Subject: [PATCH] UI: Avoid redundant URL completion in CollectionsScene **Problem Description:** Redundant URL completion in `CollectionsScene.js`. The file passes a `collection.href` that already contains the full path prefix to `UrlTextHandler.setHref`. Because `setHref` internally calls `completeHref` again, the path is double-completed (over-completed), resulting in a malformed URL. **Solution:** Instead of using `completeHref(collection.href)`, use `window.location.origin + collection.href` to manually construct the full URL, preventing the secondary completion bug. --- radicale/web/internal_data/js/scenes/CollectionsScene.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radicale/web/internal_data/js/scenes/CollectionsScene.js b/radicale/web/internal_data/js/scenes/CollectionsScene.js index d225d2d0..b02d3faa 100644 --- a/radicale/web/internal_data/js/scenes/CollectionsScene.js +++ b/radicale/web/internal_data/js/scenes/CollectionsScene.js @@ -268,7 +268,7 @@ export class CollectionsScene { } contentcount_form.textContent = contentcount_form_txt; } - let href = completeHref(collection.href); + let href = window.location.origin + collection.href; new UrlTextHandler(url_form, copy_btn).setHref(href); download_btn.href = href; download_btn.onclick = (event) => { @@ -361,4 +361,4 @@ export class CollectionsScene { return this._principal_collection.displayname; else return this._user; } -} \ No newline at end of file +}