From 49db9dc7793e838dd591c5f27eb478656e6d96dc Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Thu, 15 Sep 2022 15:10:22 +0200 Subject: Replace parentheses in pills ids From MDN: Technically, the value for an id attribute may contain any character, except whitespace characters. However, to avoid inadvertent errors, only ASCII letters, digits, '_', and '-' should be used and the value for an id attribute should start with a letter. https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id --- ogcp/static/js/ogcp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js index ac796b1..977f5a7 100644 --- a/ogcp/static/js/ogcp.js +++ b/ogcp/static/js/ogcp.js @@ -19,7 +19,7 @@ async function show_client_mac(pill_id) { function showSelectedClient(client_checkbox) { const container = $('#selected-clients'); - const pill_id = 'pill-' + client_checkbox.name.replaceAll(/[.]|[ ]/g, '_'); + const pill_id = 'pill-' + client_checkbox.name.replaceAll(/[. ()]/g, '_'); if (client_checkbox.checked) { if (!($('#' + pill_id).length)) { -- cgit v1.2.3-18-g5258