mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°5849 - Fix wrong encoding of external keys in "Header with statstics" dashlet (#384)
N°5849 - Fix wrong encoding of external keys in "Header with statstics" dashlet #384
This commit is contained in:
@@ -1045,9 +1045,19 @@ JS
|
|||||||
$aCount = $aCounts[$sStateValue];
|
$aCount = $aCounts[$sStateValue];
|
||||||
$sHyperlink = $aCount['link'];
|
$sHyperlink = $aCount['link'];
|
||||||
$sCountLabel = $aCount['label'];
|
$sCountLabel = $aCount['label'];
|
||||||
$oPill = PillFactory::MakeForState($sClass, $sStateValue)
|
|
||||||
->SetTooltip($sStateLabel)
|
$oPill = PillFactory::MakeForState($sClass, $sStateValue);
|
||||||
->AddHtml("<span class=\"ibo-dashlet-header-dynamic--count\">$sCountLabel</span><span class=\"ibo-dashlet-header-dynamic--label ibo-text-truncated-with-ellipsis\">".utils::HtmlEntities($sStateLabel)."</span>");
|
// N°5849 - Unencode label for ExternalKey attribute because friendlyname is already html encoded thanks to DBObject::GetName() in AttributeExternalKey::GetAllowedValues(). (A fix in this function may have too much impact).
|
||||||
|
if ($oAttDef instanceof AttributeExternalKey) {
|
||||||
|
$sPillTooltip = utils::HtmlEntityDecode($sStateLabel);
|
||||||
|
$sPillLabel = $sStateLabel;
|
||||||
|
} else {
|
||||||
|
$sPillTooltip = $sStateLabel;
|
||||||
|
$sPillLabel = utils::HtmlEntities($sStateLabel);
|
||||||
|
}
|
||||||
|
$oPill->SetTooltip($sPillTooltip)
|
||||||
|
->AddHtml("<span class=\"ibo-dashlet-header-dynamic--count\">$sCountLabel</span><span class=\"ibo-dashlet-header-dynamic--label ibo-text-truncated-with-ellipsis\">".$sPillLabel."</span>");
|
||||||
|
|
||||||
if ($sHyperlink != '-') {
|
if ($sHyperlink != '-') {
|
||||||
$oPill->SetUrl($sHyperlink);
|
$oPill->SetUrl($sHyperlink);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user