diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index aea1626e67b..1b1ca30f161 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -512,9 +512,9 @@ if ($action=="addelement")
elseif ($action == "unlink")
{
- $tablename = GETPOST("tablename");
- $projectField = GETPOST("projectfield");
- $elementselectid = GETPOST("elementselect");
+ $tablename = GETPOST("tablename", "aZ09");
+ $projectField = GETPOST("projectfield", "aZ09");
+ $elementselectid = GETPOST("elementselect", "int");
$result = $object->remove_element($tablename, $elementselectid, $projectField);
if ($result < 0)
@@ -890,7 +890,7 @@ foreach ($listofreferent as $key => $value)
{
if (empty($conf->global->PROJECT_DISABLE_UNLINK_FROM_OVERVIEW) || $user->admin) // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true
{
- print sprintf('', $_SERVER["PHP_SELF"], $projectid, $tablename, $element->id, $project_field?: 'fk_projet');
+ print 'id . ($project_field ? '&projectfield=' . $project_field : '') . " class="reposition">';
print img_picto($langs->trans('Unlink'), 'unlink');
print '';
}