mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Escape custom fields in API response
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
db45de5da2
commit
476e17055b
|
@ -93,15 +93,15 @@ class AssetsTransformer
|
||||||
$value = (Gate::allows('superadmin')) ? $decrypted : strtoupper(trans('admin/custom_fields/general.encrypted'));
|
$value = (Gate::allows('superadmin')) ? $decrypted : strtoupper(trans('admin/custom_fields/general.encrypted'));
|
||||||
|
|
||||||
$fields_array[$field->name] = [
|
$fields_array[$field->name] = [
|
||||||
'field' => $field->convertUnicodeDbSlug(),
|
'field' => e($field->convertUnicodeDbSlug()),
|
||||||
'value' => $value,
|
'value' => e($value),
|
||||||
'field_format' => $field->format,
|
'field_format' => $field->format,
|
||||||
];
|
];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$fields_array[$field->name] = [
|
$fields_array[$field->name] = [
|
||||||
'field' => $field->convertUnicodeDbSlug(),
|
'field' => e($field->convertUnicodeDbSlug()),
|
||||||
'value' => $asset->{$field->convertUnicodeDbSlug()},
|
'value' => e($asset->{$field->convertUnicodeDbSlug()}),
|
||||||
'field_format' => $field->format,
|
'field_format' => $field->format,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue