From 41e0275c951798bb69836ee3f8350cae45542e39 Mon Sep 17 00:00:00 2001 From: spencerrlongg Date: Wed, 3 Jan 2024 12:42:36 -0600 Subject: [PATCH] `htmlentities()` --- resources/views/models/custom_fields_form.blade.php | 2 +- resources/views/models/custom_fields_form_bulk_edit.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/models/custom_fields_form.blade.php b/resources/views/models/custom_fields_form.blade.php index bae98373e4..90985ce77f 100644 --- a/resources/views/models/custom_fields_form.blade.php +++ b/resources/views/models/custom_fields_form.blade.php @@ -9,7 +9,7 @@ @if ($field->element=='listbox') {{ Form::select($field->db_column_name(), $field->formatFieldValuesAsArray(), - Request::old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, htmlspecialchars($item->{$field->db_column_name()}, ENT_QUOTES)) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }} + Request::old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, htmlentities($item->{$field->db_column_name()})) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }} @elseif ($field->element=='textarea') diff --git a/resources/views/models/custom_fields_form_bulk_edit.blade.php b/resources/views/models/custom_fields_form_bulk_edit.blade.php index f30c60d331..f01815d5e3 100644 --- a/resources/views/models/custom_fields_form_bulk_edit.blade.php +++ b/resources/views/models/custom_fields_form_bulk_edit.blade.php @@ -25,7 +25,7 @@ @if ($field->element=='listbox') {{ Form::select($field->db_column_name(), $field->formatFieldValuesAsArray(), - Request::old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, htmlspecialchars($item->{$field->db_column_name()}, ENT_QUOTES)) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }} + Request::old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, htmlentities($item->{$field->db_column_name()})) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }} @elseif ($field->element=='textarea') @if($field->is_unique)