mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
Make content safe too
This commit is contained in:
parent
a0df8f8413
commit
2a6fd69192
1 changed files with 5 additions and 2 deletions
|
@ -216,7 +216,8 @@ if ($action == "list" or $action== "listslaves") {
|
|||
$any = array();
|
||||
foreach ($rows['records'] as $idx => $record) {
|
||||
$rows['records'][$idx]['id'] = json_encode($record);
|
||||
$record['name'] = htmlspecialchars($record['name']);
|
||||
$rows['records'][$idx]['name'] = htmlspecialchars($record['name']);
|
||||
$rows['records'][$idx]['content'] = htmlspecialchars($record['content']);
|
||||
if ($record['type'] == 'SOA') { array_push($soa, $rows['records'][$idx]); }
|
||||
elseif ($record['type'] == 'NS') { array_push($ns, $rows['records'][$idx]); }
|
||||
elseif ($record['type'] == 'MX') { array_push($mx, $rows['records'][$idx]); }
|
||||
|
@ -240,7 +241,9 @@ if ($action == "list" or $action== "listslaves") {
|
|||
}
|
||||
|
||||
$records =_create_record($name, $records, $_POST, $_GET['zoneurl']);
|
||||
_jtable_respond($records[sizeof($records)-1], 'single');
|
||||
$ret = $records[sizeof($records)-1];
|
||||
$ret['content'] = htmlspecialchars($ret['content']);
|
||||
_jtable_respond($ret, 'single');
|
||||
} elseif ($action == "deleterecord") {
|
||||
$todel = json_decode($_POST['id'], 1);
|
||||
$records = getrecords_by_name_type($_GET['zoneurl'], $todel['name'], $todel['type']);
|
||||
|
|
Loading…
Add table
Reference in a new issue