diff --git a/src/Domain.php b/src/Domain.php
index 264b7ca92f2..0c61be90584 100644
--- a/src/Domain.php
+++ b/src/Domain.php
@@ -845,10 +845,9 @@ public static function getAdditionalMenuLinks()
{
$links = [];
if (static::canManageRecords()) {
- $rooms = "
-
- " . DomainRecord::getTypeName(Session::getPluralNumber()) . "
- ";
+ $label = htmlspecialchars(DomainRecord::getTypeName(Session::getPluralNumber()));
+ $rooms = "
+ $label";
$links[$rooms] = DomainRecord::getSearchURL(false);
}
if (count($links)) {
diff --git a/src/Dropdown.php b/src/Dropdown.php
index c8cf2b64bc0..b75705b1d28 100644
--- a/src/Dropdown.php
+++ b/src/Dropdown.php
@@ -611,36 +611,36 @@ public static function getDropdownName($table, $id, $withcomment = false, $trans
if (!empty($data["phone"])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
- "" . Phone::getTypeName(1),
- "" . $data['phone']
+ "" . htmlspecialchars(Phone::getTypeName(1)),
+ "" . htmlspecialchars($data['phone'])
);
}
if (!empty($data["phone2"])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
- "" . __('Phone 2'),
- "" . $data['phone2']
+ "" . __s('Phone 2'),
+ "" . htmlspecialchars($data['phone2'])
);
}
if (!empty($data["mobile"])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
- "" . __('Mobile phone'),
- "" . $data['mobile']
+ "" . __s('Mobile phone'),
+ "" . htmlspecialchars($data['mobile'])
);
}
if (!empty($data["fax"])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
- "" . __('Fax'),
- "" . $data['fax']
+ "" . __s('Fax'),
+ "" . htmlspecialchars($data['fax'])
);
}
if (!empty($data["email"])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
"" . _n('Email', 'Emails', 1),
- "" . $data['email']
+ "" . htmlspecialchars($data['email'])
);
}
}
@@ -651,22 +651,22 @@ public static function getDropdownName($table, $id, $withcomment = false, $trans
if (!empty($data["phonenumber"])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
- "" . Phone::getTypeName(1),
- "" . $data['phonenumber']
+ "" . htmlspecialchars(Phone::getTypeName(1)),
+ "" . htmlspecialchars($data['phonenumber'])
);
}
if (!empty($data["fax"])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
- "" . __('Fax'),
- "" . $data['fax']
+ "" . __s('Fax'),
+ "" . htmlspecialchars($data['fax'])
);
}
if (!empty($data["email"])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
- "" . _n('Email', 'Emails', 1),
- "" . $data['email']
+ "" . _sn('Email', 'Emails', 1),
+ "" . htmlspecialchars($data['email'])
);
}
}
@@ -690,7 +690,7 @@ public static function getDropdownName($table, $id, $withcomment = false, $trans
if (!empty($data['locations_id'])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
- "" . Location::getTypeName(1) . "",
+ "" . htmlspecialchars(Location::getTypeName(1)) . "",
self::getDropdownName(
"glpi_locations",
$data["locations_id"],
@@ -702,7 +702,7 @@ public static function getDropdownName($table, $id, $withcomment = false, $trans
if (!empty($data['budgettypes_id'])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
- "" . _n('Type', 'Types', 1) . "",
+ "" . _sn('Type', 'Types', 1) . "",
self::getDropdownName(
"glpi_budgettypes",
$data["budgettypes_id"],
@@ -714,14 +714,14 @@ public static function getDropdownName($table, $id, $withcomment = false, $trans
if (!empty($data['begin_date'])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
- "" . __('Start date') . "",
+ "" . __s('Start date') . "",
Html::convDateTime($data["begin_date"])
);
}
if (!empty($data['end_date'])) {
$comment .= "
" . sprintf(
__('%1$s: %2$s'),
- "" . __('End date') . "",
+ "" . __s('End date') . "",
Html::convDateTime($data["end_date"])
);
}
@@ -1359,6 +1359,8 @@ public static function showItemTypeMenu(string $title, array $optgroup, string $
echo "