From c2013ec901769250722b6911a0a764da7ccb8949 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Thu, 27 Feb 2025 07:50:41 +0100 Subject: [PATCH] permit dot inside collection name, but not as first char, fixes https://github.com/Kozea/Radicale/issues/1632 --- radicale/web/internal_data/fn.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/radicale/web/internal_data/fn.js b/radicale/web/internal_data/fn.js index af13ad0a..9b0bad3b 100644 --- a/radicale/web/internal_data/fn.js +++ b/radicale/web/internal_data/fn.js @@ -1348,8 +1348,10 @@ function cleanHREFinput(a) { href_form = a.target; } let currentTxtVal = href_form.value.trim().toLowerCase(); - //Clean the HREF to remove non lowercase letters and dashes - currentTxtVal = currentTxtVal.replace(/(?![0-9a-z\-\_])./g, ''); + //Clean the HREF to remove not permitted chars + currentTxtVal = currentTxtVal.replace(/(?![0-9a-z\-\_\.])./g, ''); + //Clean the HREF to remove leading . (would result in hidden directory) + currentTxtVal = currentTxtVal.replace(/^\./, ''); href_form.value = currentTxtVal; }