N°3835 - Make global pass on all inputs (objects, dashlets, ...) to ensure XSS and double encoding have been dealt with

This commit is contained in:
acognet
2021-10-04 13:52:36 +02:00
parent 94d99a4109
commit e38ca54691
2 changed files with 3 additions and 4 deletions

View File

@@ -823,9 +823,9 @@ JS
$aJsonMap = array();
foreach ($aValues as $sKey => $aValue) {
$aElt = ['value' => $sKey, 'label' => $aValue['label'], 'obsolescence_flag' => $aValue['obsolescence_flag']];
$aElt = ['value' => $sKey, 'label' => utils::HtmlEntities($aValue['label']), 'obsolescence_flag' => $aValue['obsolescence_flag']];
if ($aValue['additional_field'] != '') {
$aElt['additional_field'] = $aValue['additional_field'];
$aElt['additional_field'] = utils::HtmlEntities($aValue['additional_field']);
}
if (array_key_exists('initials', $aValue)) {