diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php
index b8d0949a1f0..5f7687a3d26 100644
--- a/htdocs/bookmarks/card.php
+++ b/htdocs/bookmarks/card.php
@@ -153,7 +153,7 @@ if ($action == 'create')
print '
';
- print ''.$langs->trans("BookmarkTitle").' '.$langs->trans("SetHereATitleForLink").' ';
+ print ''.$langs->trans("BookmarkTitle").' '.$langs->trans("SetHereATitleForLink").' ';
dol_set_focus('#titlebookmark');
// Url
@@ -167,12 +167,12 @@ if ($action == 'create')
// Owner
print ''.$langs->trans("Owner").' ';
- print img_picto('', 'user').' '.$form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : $user->id, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
+ print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print ' ';
// Position
print ''.$langs->trans("Position").' ';
- print ' position).'">';
+ print ' position).'">';
print ' ';
print '
';
@@ -238,7 +238,7 @@ if ($id > 0 && !preg_match('/^add/i', $action))
}
print '';
- if ($action == 'edit') print ' title).'">';
+ if ($action == 'edit') print ' title).'">';
else print $object->title;
print ' ';
@@ -251,7 +251,7 @@ if ($id > 0 && !preg_match('/^add/i', $action))
print '';
}
print '';
- if ($action == 'edit') print ' url).'">';
+ if ($action == 'edit') print ' url).'">';
else print 'target ? ' target="_blank"' : '').'>'.$object->url.' ';
print ' ';
@@ -259,7 +259,7 @@ if ($id > 0 && !preg_match('/^add/i', $action))
if ($action == 'edit')
{
$liste = array(1=>$langs->trans("OpenANewWindow"), 0=>$langs->trans("ReplaceWindow"));
- print $form->selectarray('target', $liste, isset($_POST["target"]) ? $_POST["target"] : $object->target);
+ print $form->selectarray('target', $liste, GETPOSTISSET("target") ? GETPOST("target") : $object->target);
} else {
if ($object->target == 0) print $langs->trans("ReplaceWindow");
if ($object->target == 1) print $langs->trans("OpenANewWindow");
@@ -269,7 +269,7 @@ if ($id > 0 && !preg_match('/^add/i', $action))
print ''.$langs->trans("Owner").' ';
if ($action == 'edit' && $user->admin)
{
- print img_picto('', 'user').' '.$form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
+ print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
} else {
if ($object->fk_user > 0)
{
@@ -284,7 +284,7 @@ if ($id > 0 && !preg_match('/^add/i', $action))
// Position
print ' '.$langs->trans("Position").' ';
- if ($action == 'edit') print ' position).'">';
+ if ($action == 'edit') print ' position).'">';
else print $object->position;
print ' ';
diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php
index 7f70d74f5d9..6ad2770aa25 100644
--- a/htdocs/bookmarks/list.php
+++ b/htdocs/bookmarks/list.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2005-2020 Laurent Destailleur
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -197,14 +197,14 @@ while ($i < min($num, $limit))
// Title
print "";
$linkintern = 1;
- if ($linkintern) print "url."\">";
+ if ($linkintern) print ' ';
print $title;
if ($linkintern) print " ";
print " \n";
// Url
print '';
- if (!$linkintern) print 'target ? ' target="newlink"' : '').'>';
+ if (!$linkintern) print ' target ? ' target="newlink" rel="noopener"' : '').'>';
print $link;
if (!$linkintern) print ' ';
print " \n";
@@ -241,7 +241,7 @@ while ($i < min($num, $limit))
print '';
if ($user->rights->bookmark->creer)
{
- print 'rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit()." ";
+ print ''.img_edit()." ";
}
if ($user->rights->bookmark->supprimer)
{