diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 137ddd1c7cb..18999ed9a1f 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1445,24 +1445,19 @@ while ($i < min($num, $limit)) { } } if (!empty($arrayfields['s.nom']['checked'])) { - $savalias = $obj->name_alias; - if (!empty($arrayfields['s.name_alias']['checked'])) { - $companystatic->name_alias = ''; - } print 'global->MAIN_SOCIETE_SHOW_COMPLETE_NAME) ? ' class="tdoverflowmax200"' : '').' data-key="ref">'; if ($contextpage == 'poslist') { - print $obj->name; + print dol_escape_htmltag($obj->name); } else { - print $companystatic->getNomUrl(1, '', 100, 0, 1); + print $companystatic->getNomUrl(1, '', 100, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); } print "\n"; - $companystatic->name_alias = $savalias; if (!$i) { $totalarray['nbfield']++; } } if (!empty($arrayfields['s.name_alias']['checked'])) { - print ''; + print ''; print dol_escape_htmltag($companystatic->name_alias); print "\n"; if (!$i) { @@ -1471,7 +1466,7 @@ while ($i < min($num, $limit)) { } // Barcode if (!empty($arrayfields['s.barcode']['checked'])) { - print ''.dol_escape_htmltag($obj->barcode).''; + print ''.dol_escape_htmltag($obj->barcode).''; if (!$i) { $totalarray['nbfield']++; }