mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 04:38:28 +00:00
@@ -36,7 +36,7 @@ function setConfigValues(topic, key, value) {
|
||||
}
|
||||
|
||||
// else: we have a setting we can set
|
||||
var escapedKey = key.replace(/\./g, "\\.");
|
||||
var escapedKey = key.replaceAll(/\./, "\\.");
|
||||
switch (value.type) {
|
||||
case "enum (unsigned integer)": // fallthrough
|
||||
case "enum (string)": {
|
||||
@@ -127,7 +127,7 @@ function saveSettings() {
|
||||
tmp = tmp[parts[i]];
|
||||
}
|
||||
|
||||
tmp[parts[parts.length - 1]] = value;
|
||||
tmp[parts.at(-1)] = value;
|
||||
|
||||
// Merge deep object into settings
|
||||
$.extend(true, settings, obj);
|
||||
|
||||
@@ -30,7 +30,7 @@ function escapeHtml(text) {
|
||||
// Return early when text is not a string
|
||||
if (typeof text !== "string") return text;
|
||||
|
||||
return text.replace(/[&<>"']/g, function (m) {
|
||||
return text.replaceAll(/[&<>"']/, function (m) {
|
||||
return map[m];
|
||||
});
|
||||
}
|
||||
@@ -53,8 +53,8 @@ function unescapeHtml(text) {
|
||||
|
||||
if (text === null) return null;
|
||||
|
||||
return text.replace(
|
||||
/&(?:amp|lt|gt|quot|#039|Uuml|uuml|Auml|auml|Ouml|ouml|szlig);/g,
|
||||
return text.replaceAll(
|
||||
/&(?:amp|lt|gt|quot|#039|Uuml|uuml|Auml|auml|Ouml|ouml|szlig);/,
|
||||
function (m) {
|
||||
return map[m];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user