Clean code

This commit is contained in:
ldestailleur
2025-03-09 22:42:59 +01:00
parent 3658bc20b6
commit 8c3b05d607
2 changed files with 8 additions and 7 deletions

View File

@@ -341,7 +341,7 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
if (!empty($head['graph'])) {
$label .= ' <span class="opacitymedium fas fa-chart-bar"></span>';
}
$out .= '<input type="hidden" id="boxlabelentry'.$this->box_id.'" value="'.dol_escape_htmltag($label).'">';
$out .= '<input type="hidden" id="boxlabelentry'.$this->box_id.'" value="'.dolPrintHTMLForAttribute($label).'">';
$out .= '</div>';
}
@@ -388,7 +388,7 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
if (!empty($contents[$i][$j]['url']) && empty($contents[$i][$j]['logo'])) {
$out .= '<a href="'.$contents[$i][$j]['url'].'"';
if (!empty($tooltip)) {
$out .= ' title="'.dol_escape_htmltag($langs->trans("Show").' '.$tooltip, 1).'" class="classfortooltip"';
$out .= ' title="'.dolPrintHTMLForAttribute($langs->trans("Show").' '.$tooltip, 1).'" class="classfortooltip"';
}
//$out.= ' alt="'.$textwithnotags.'"'; // Pas de alt sur un "<a href>"
$out .= isset($contents[$i][$j]['target']) ? ' target="'.$contents[$i][$j]['target'].'"' : '';