some fixes

This commit is contained in:
2026-07-01 11:26:29 +02:00
parent df63969bc5
commit 355d6f4c19
6 changed files with 17 additions and 24 deletions
+5 -1
View File
@@ -91,9 +91,13 @@ function populateFields(data, prefix = "") {
});
}
function safeId(str) {
return str.replace(/[^a-zA-Z0-9_-]/g, "_");
}
function updateConfigData(data, prefix = "") {
$.each(data, (key, value) => {
const id = `${prefix}${prefix ? "-" : ""}${key}`;
let id = `${prefix}${prefix ? "-" : ""}${safeId(key)}`;
const $element = $(`#${id}`);
if (key === "presets") {