# HG changeset patch # User Alain Mazy # Date 1741962077 -3600 # Node ID cad933339ead72af49e7d99b9aaaa16ece529478 # Parent cba3e8ca3a878f53ee7e1778f87d5a4f84b92814 OE: Allow '-' and '_' in labels. diff -r cba3e8ca3a87 -r cad933339ead NEWS --- a/NEWS Tue Mar 11 10:46:15 2025 +0100 +++ b/NEWS Fri Mar 14 15:21:17 2025 +0100 @@ -27,7 +27,8 @@ (Deflated Explicit VR Little Endian) in static builds * Housekeeper plugin: - When encountering an error, the housekeeper now skips the resource and continues processing. - +* Orthanc Explorer: + - Allow '-' and '_' in labels. Version 1.12.6 (2025-01-22) diff -r cba3e8ca3a87 -r cad933339ead OrthancServer/OrthancExplorer/explorer.js --- a/OrthancServer/OrthancExplorer/explorer.js Tue Mar 11 10:46:15 2025 +0100 +++ b/OrthancServer/OrthancExplorer/explorer.js Fri Mar 14 15:21:17 2025 +0100 @@ -71,6 +71,11 @@ return s.match(/^[0-9a-zA-Z]+$/); } +function IsValidLabelName(s) +{ + return s.match(/^[0-9a-zA-Z\-_]+$/); +} + function DeepCopy(obj) { @@ -780,7 +785,7 @@ click: function () { var label = $.mobile.sdLastInput; if (label.length > 0) { - if (IsAlphanumeric(label)) { + if (IsValidLabelName(label)) { $.ajax({ url: '../' + resourceLevel + '/' + resourceId + '/labels/' + label, dataType: 'json',