mirror of https://git.48k.eu/ogcp
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/idasync-tree
parent
5af589a94d
commit
49db9dc779
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue