diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index a89fd916c94..042ec7c6864 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -753,14 +753,14 @@ class FormCompany extends Form if ($disabled) { print ' disabled'; } - print ' selected>' . dol_trunc($obj->name, 24) . ''; + print ' selected>' . dol_escape_htmltag($obj->name, 0, 0, '', 0, 1) . ''; $firstCompany = $obj->rowid; } else { print ''; + print '>' . dol_escape_htmltag($obj->name, 0, 0, '', 0, 1) . ''; } $i++; } diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 0b6c6fb9939..7f4b3971205 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -143,7 +143,8 @@ if ($permission) {
socid) ? 0 : $object->socid); - $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?> + $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); // This also print the select component + ?>