mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Added escaping to API output
This commit is contained in:
parent
b13e04095e
commit
3e3276334b
|
@ -25,16 +25,18 @@ class CustomFieldsetsTransformer
|
|||
$fields = $fieldset->fields;
|
||||
$models = $fieldset->models;
|
||||
$modelsArray = array();
|
||||
|
||||
foreach ($models as $model)
|
||||
{
|
||||
$modelsArray[] = [
|
||||
'id' => $model->id,
|
||||
'name' => $model->name
|
||||
'name' => e($model->name)
|
||||
];
|
||||
}
|
||||
|
||||
$array = [
|
||||
'id' => $fieldset->id,
|
||||
'name' => $fieldset->name,
|
||||
'name' => e($fieldset->name),
|
||||
'fields' => (new CustomFieldsTransformer)->transformCustomFields($fields, $fieldset->fields_count),
|
||||
'models' => (new DatatablesTransformer)->transformDatatables($modelsArray, $fieldset->models_count)
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue