A free open source IT asset/license management system
Fixed FD-56252: escape fieldname in custom fields
snipe58754e4e3b86
diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.phpindex 2c2c853c5d..4725d9a8bb 100644--- a/app/Presenters/AssetPresenter.php+++ b/app/Presenters/AssetPresenter.php@@ -351,17 +351,14 @@ class AssetPresenter extends Presenter$fields = CustomField::whereHas('fieldset', function ($query) {$query->whereHas('models');})->get();-- // Note: We do not need to e() escape the field names here, as they are already escaped when- // they are presented in the blade view. If we escape them here, custom fields with quotes in their- // name can break the listings page. - snipe+foreach ($fields as $field) {$layout[] = ['field' => $field->db_column,'searchable' => true,'sortable' => true,'switchable' => true,- 'title' => $field->name,+ 'title' => e($field->name),'formatter' => 'customFieldsFormatter','escape' => true,'class' => ($field->field_encrypted == '1') ? 'css-padlock' : '',