Skip to content

Commit

Permalink
fix(forms): Fixed title field destination prepareInput
Browse files Browse the repository at this point in the history
  • Loading branch information
ccailly authored and cedric-anne committed Sep 17, 2024
1 parent 50a87ef commit d6d60ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Glpi/Form/Destination/CommonITILField/TitleField.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ public function getDefaultConfig(Form $form): SimpleValueConfig
#[Override]
public function prepareInput(array $input): array
{
if (isset($input['title']) && isset($input['title']['value'])) {
if (isset($input[$this->getKey()]) && isset($input[$this->getKey()]['value'])) {
// Remove HTML tags except span with data-form-tag attribute
$input['title']['value'] = strip_tags($input['title']['value'], '<span>');
$input[$this->getKey()]['value'] = strip_tags($input[$this->getKey()]['value'], '<span>');
}

return $input;
Expand Down

0 comments on commit d6d60ba

Please sign in to comment.