From 8c46c99ecc47b1130142f65b46290b496e977ae4 Mon Sep 17 00:00:00 2001 From: jf-cbd Date: Tue, 30 Apr 2024 15:04:28 +0200 Subject: [PATCH] =?UTF-8?q?=20N=C2=B07313=20-=20Bad=20display=20of=20singl?= =?UTF-8?q?e=20quotes=20in=20charts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/displayblock.class.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/displayblock.class.inc.php b/application/displayblock.class.inc.php index 89d1c32c7..aabc9a6ab 100644 --- a/application/displayblock.class.inc.php +++ b/application/displayblock.class.inc.php @@ -1684,16 +1684,19 @@ JS $aRes = CMDBSource::QueryToArray($sSql); $oContext = new ApplicationContext(); $sContextParam = $oContext->GetForLink(); + /** @var AttributeDefinition $oGroupByAttDef */ + $oGroupByAttDef = $aGroupBy["grouped_by_1"]->GetAttDef(); $iTotalCount = 0; $aURLs = array(); foreach ($aRes as $iRow => $aRow) { $sValue = $aRow['grouped_by_1']; - $sHtmlValue = $oGroupByExp->MakeValueLabel($this->m_oFilter, $sValue, $sValue); + $sPlainTextValue = $oGroupByAttDef->GetValueLabel($sValue); + $sHtmlValue = utils::EscapeHtml($sPlainTextValue); $iTotalCount += $aRow['_itop_count_']; $aValues[] = array( - 'label' => $sValue, + 'label' => $sPlainTextValue, 'label_html' => $sHtmlValue, 'value' => (float)$aRow[$sFctVar], );