diff --git a/app/Traits/GeneratesPdfTrait.php b/app/Traits/GeneratesPdfTrait.php index fb7763c4b..785a8fdc4 100644 --- a/app/Traits/GeneratesPdfTrait.php +++ b/app/Traits/GeneratesPdfTrait.php @@ -157,6 +157,10 @@ public function getFieldsArray() foreach ($customerCustomFields as $customField) { $fields['{'.$customField->customField->slug.'}'] = $customField->defaultAnswer; } + + foreach ($fields as $key => $field) { + $fields[$key] = htmlspecialchars($field, ENT_QUOTES, 'UTF-8'); + } return $fields; }