We should not use JSON.stringify() but leave escaping to AJAX itself

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-10-12 18:04:30 +02:00
parent e4e2ffabff
commit d2701f7955
9 changed files with 25 additions and 21 deletions
+3 -3
View File
@@ -440,7 +440,7 @@ function addClient() {
url: "/api/clients",
method: "post",
dataType: "json",
data: JSON.stringify({ client: ip, comment: comment }),
data: { client: ip, comment: comment },
success: function () {
utils.enableAll();
utils.showAlert("success", "fas fa-plus", "Successfully added client", ip);
@@ -495,12 +495,12 @@ function editClient() {
url: "/api/clients/" + encodeURIComponent(clientDecoded),
method: "put",
dataType: "json",
data: JSON.stringify({
data: {
client: client,
groups: groups,
comment: comment,
enabled: enabled,
}),
},
success: function () {
utils.enableAll();
utils.showAlert(