mirror of
https://github.com/pi-hole/web.git
synced 2026-05-08 09:39:05 +01:00
We should not use JSON.stringify() but leave escaping to AJAX itself
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user