Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Cédric Anne <cedric.anne@gmail.com>
  • Loading branch information
AdrienClairembault and cedric-anne authored Sep 17, 2024
1 parent 014c213 commit 754cc04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/DbUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -1476,11 +1476,11 @@ public function getTreeValueCompleteName($table, $ID, $withcomment = false, $tra
$alias = $result['alias'];
if (!empty($alias)) {
$name = $alias;
$comment .= "<span class='b'>" . __s('Alias:') . "</span> " . $alias . "<br/>";
$comment .= "<span class='b'>" . __s('Alias:') . "</span> " . htmlspecialchars($alias) . "<br/>";
}
if (!empty($code)) {
$name .= ' - ' . $code;
$comment .= "<span class='b'>" . __s('Code:') . "</span> " . $code . "<br/>";
$comment .= "<span class='b'>" . __s('Code:') . "</span> " . htmlspecialchars($code) . "<br/>";
}
if (!empty($address)) {
$acomment .= $address;
Expand Down
2 changes: 1 addition & 1 deletion src/DocumentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static function getSpecificValueToDisplay($field, $values, array $options
case 'icon':
if (!empty($values[$field])) {
return "&nbsp;<img style='vertical-align:middle;' alt='' src='" .
$CFG_GLPI["typedoc_icon_dir"] . "/" . htmlspecialchars($values[$field]) . "'>";
htmlspecialchars($CFG_GLPI["typedoc_icon_dir"] . "/" . $values[$field]) . "'>";
}
}
return parent::getSpecificValueToDisplay($field, $values, $options);
Expand Down

0 comments on commit 754cc04

Please sign in to comment.