Skip to content

Commit

Permalink
Fix escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne committed Jul 31, 2024
1 parent dee95e1 commit ebf857e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Glpi/Asset/CustomField.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $
$field_options = json_decode($data['field_options'] ?? '[]', true) ?? [];
$flags = '';
if ($field_options['readonly'] ?? false) {
$flags .= '<span class="badge badge-outline text-secondary">' . __('Read-only') . '</span>';
$flags .= '<span class="badge badge-outline text-secondary">' . __s('Read-only') . '</span>';
}
if ($field_options['required'] ?? false) {
$flags .= '<span class="badge badge-outline text-secondary">' . __('Mandatory') . '</span>';
$flags .= '<span class="badge badge-outline text-secondary">' . __s('Mandatory') . '</span>';
}
if ($field_options['multiple'] ?? false) {
$flags .= '<span class="badge badge-outline text-secondary">' . __('Multiple values') . '</span>';
$flags .= '<span class="badge badge-outline text-secondary">' . __s('Multiple values') . '</span>';
}
$entry['flags'] = $flags;
$entries[] = $entry;
Expand Down

0 comments on commit ebf857e

Please sign in to comment.