1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-06-26 16:45:52 +00:00

permit dot inside collection name, but not as first char, fixes https://github.com/Kozea/Radicale/issues/1632

This commit is contained in:
Peter Bieringer 2025-02-27 07:50:41 +01:00
parent 29b1da4652
commit c2013ec901

View file

@ -1348,8 +1348,10 @@ function cleanHREFinput(a) {
href_form = a.target; href_form = a.target;
} }
let currentTxtVal = href_form.value.trim().toLowerCase(); let currentTxtVal = href_form.value.trim().toLowerCase();
//Clean the HREF to remove non lowercase letters and dashes //Clean the HREF to remove not permitted chars
currentTxtVal = currentTxtVal.replace(/(?![0-9a-z\-\_])./g, ''); 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; href_form.value = currentTxtVal;
} }