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
async-tree
Javier Sánchez Parra 2022-09-15 15:10:22 +02:00
parent 5af589a94d
commit 49db9dc779
1 changed files with 1 additions and 1 deletions

View File

@ -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)) {