diff --git a/core/cmdbchangeop.class.inc.php b/core/cmdbchangeop.class.inc.php index 537ca8d00..6dbcf3f75 100644 --- a/core/cmdbchangeop.class.inc.php +++ b/core/cmdbchangeop.class.inc.php @@ -78,7 +78,7 @@ class CMDBChangeOp extends DBObject implements iCMDBChangeOp } /** - * Describe (as a text string) the modifications corresponding to this change + * @inheritDoc */ public function GetDescription() { diff --git a/sources/application/UI/Base/Component/FieldBadge/FieldBadgeUIBlockFactory.php b/sources/application/UI/Base/Component/FieldBadge/FieldBadgeUIBlockFactory.php index 353254153..e8cd1c94e 100644 --- a/sources/application/UI/Base/Component/FieldBadge/FieldBadgeUIBlockFactory.php +++ b/sources/application/UI/Base/Component/FieldBadge/FieldBadgeUIBlockFactory.php @@ -10,6 +10,7 @@ namespace Combodo\iTop\Application\UI\Base\Component\FieldBadge; use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory; use ormStyle; +use utils; /** * Class FieldBadgeUIBlockFactory @@ -36,6 +37,10 @@ class FieldBadgeUIBlockFactory extends AbstractUIBlockFactory { $oBadge = null; $sHtml = ''; + + // N°5318 - Sanitize value manually as this UIBlock is not using a proper TWIG template 😥 + $sValueForHtml = utils::EscapeHtml($sValue); + if ($oStyle) { $sStyleClass = $oStyle->GetStyleClass(); $sPrimaryColor = $oStyle->GetMainColor(); @@ -47,12 +52,12 @@ class FieldBadgeUIBlockFactory extends AbstractUIBlockFactory if (!is_null($sDecorationClasses) && !empty($sDecorationClasses)) { $sHtml .= ""; } - $sHtml .= "$sValue"; + $sHtml .= "$sValueForHtml"; } } if (!$oBadge) { $oBadge = new FieldBadge(); - $sHtml .= "$sValue"; + $sHtml .= "$sValueForHtml"; } $oBadge->AddHtml($sHtml); return $oBadge;