| '.$langs->trans("LinkToCompanyContact").' | ';
print '';
+ $s = '';
if (isset($object->socid) && $object->socid > 0)
{
$societe = new Societe($db);
$societe->fetch($object->socid);
- print $societe->getNomUrl(1, '');
+ if ($societe->id > 0){
+ $s .= $societe->getNomUrl(1, '');
+ }
} else {
- print $langs->trans("ThisUserIsNot");
+ $s .= $langs->trans("ThisUserIsNot");
}
if (!empty($object->contact_id))
{
$contact = new Contact($db);
$contact->fetch($object->contact_id);
- if ($object->socid > 0) print ' / ';
- else print ' ';
- print $contact->getNomUrl(1, '');
+ if ($contact->id > 0) {
+ if ($object->socid > 0 && $s) $s .= ' / ';
+ else $s .= ' ';
+ $s .= $contact->getNomUrl(1, '');
+ }
}
+ print $s;
print ' | ';
print '
'."\n";
}
diff --git a/htdocs/user/note.php b/htdocs/user/note.php
index 955c1f14599..a0c3c160de7 100644
--- a/htdocs/user/note.php
+++ b/htdocs/user/note.php
@@ -64,7 +64,7 @@ if (empty($reshook)) {
if ($action == 'update' && $user->rights->user->user->creer && !$_POST["cancel"]) {
$db->begin();
- $res = $object->update_note(dol_html_entity_decode(GETPOST('note_private', 'restricthtml'), ENT_QUOTES));
+ $res = $object->update_note(dol_html_entity_decode(GETPOST('note_private', 'restricthtml'), ENT_QUOTES|ENT_HTML5));
if ($res < 0) {
$mesg = '