Minor adjustments

This commit is contained in:
David Bomba 2024-02-12 14:00:24 +11:00
parent 2c25371011
commit 192722b7a4
5 changed files with 26 additions and 4 deletions

View File

@ -198,6 +198,18 @@ class Request extends FormRequest
} }
} }
if(isset($input['public_notes']))
$input['public_notes'] = str_replace("</","<-", $input['public_notes']);
if(isset($input['footer']))
$input['footer'] = str_replace("</", "<-", $input['footer']);
if(isset($input['terms']))
$input['terms'] = str_replace("</", "<-", $input['terms']);
if(isset($input['private_notes']))
$input['private_notes'] = str_replace("</", "<-", $input['private_notes']);
return $input; return $input;
} }

View File

@ -89,6 +89,10 @@ class StoreVendorRequest extends Request
$input['currency_id'] = $user->company()->settings->currency_id; $input['currency_id'] = $user->company()->settings->currency_id;
} }
if (isset($input['name'])) {
$input['name'] = strip_tags($input['name']);
}
$input = $this->decodePrimaryKeys($input); $input = $this->decodePrimaryKeys($input);
$this->replace($input); $this->replace($input);

View File

@ -92,8 +92,8 @@ class UpdateVendorRequest extends Request
{ {
$input = $this->all(); $input = $this->all();
if (array_key_exists('assigned_user_id', $input) && is_string($input['assigned_user_id'])) { if (isset($input['name'])) {
$input['assigned_user_id'] = $this->decodePrimaryKey($input['assigned_user_id']); $input['name'] = strip_tags($input['name']);
} }
if (array_key_exists('country_id', $input) && is_null($input['country_id'])) { if (array_key_exists('country_id', $input) && is_null($input['country_id'])) {

View File

@ -74,6 +74,12 @@ trait CleanLineItems
} }
if(isset($item['notes']))
$item['notes'] = str_replace("</", "<-", $item['notes']);
if(isset($item['product_key']))
$item['product_key'] = str_replace("</", "<-", $item['product_key']);
} }
if (array_key_exists('id', $item) || array_key_exists('_id', $item)) { if (array_key_exists('id', $item) || array_key_exists('_id', $item)) {

View File

@ -170,7 +170,7 @@ span {
</button> </button>
<div id="notes" class="py-10 border-b-2 border-fuschia-600" x-show="show_notes"> <div id="notes" class="py-10 border-b-2 border-fuschia-600" x-show="show_notes">
{!! html_entity_decode($entity->public_notes) !!} {!! html_entity_decode(e($entity->public_notes)) !!}
</div> </div>
</div> </div>