encode special characters when saving device details #644🚑

This commit is contained in:
jokob-sk
2024-04-22 07:37:31 +10:00
parent b0f1f581dc
commit 9cef7848c5
3 changed files with 8 additions and 8 deletions

View File

@@ -1443,15 +1443,15 @@ function setDeviceData (direction='', refreshCallback='') {
// update data to server
$.get('php/server/devices.php?action=setDeviceData&mac='+ mac
+ '&name=' + $('#txtName').val()
+ '&owner=' + $('#txtOwner').val()
+ '&name=' + encodeURIComponent($('#txtName').val())
+ '&owner=' + encodeURIComponent($('#txtOwner').val())
+ '&type=' + $('#txtDeviceType').val()
+ '&vendor=' + $('#txtVendor').val()
+ '&vendor=' + encodeURIComponent($('#txtVendor').val())
+ '&icon=' + encodeURIComponent($('#txtIcon').val())
+ '&favorite=' + ($('#chkFavorite')[0].checked * 1)
+ '&group=' + $('#txtGroup').val()
+ '&location=' + $('#txtLocation').val()
+ '&comments=' + $('#txtComments').val()
+ '&group=' + encodeURIComponent($('#txtGroup').val())
+ '&location=' + encodeURIComponent($('#txtLocation').val())
+ '&comments=' + encodeURIComponent($('#txtComments').val())
+ '&networknode=' + $('#txtNetworkNodeMac').attr('data-mynodemac')
+ '&networknodeport=' + $('#txtNetworkPort').val()
+ '&staticIP=' + ($('#chkStaticIP')[0].checked * 1)