diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 8f196c85eab..5340083141a 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -370,18 +370,11 @@ class Form
else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
$s="";
- if (empty($notabs)) $s.='
';
- if ($direction < 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.''.$tag.'>';
- if ($text != '')
- {
- $s.='<'.$tag.$paramfortooltiptd.'>';
- if ($direction < 0) $s.=' ';
- $s.=$text;
- if ($direction > 0) $s.=' ';
- $s.=''.$tag.'>';
- }
- if ($direction > 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.''.$tag.'>';
- if (empty($notabs)) $s.='
';
+ if (empty($notabs)) $s.='';
+ if ($direction < 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14"> '.$img.''.$tag.'>';
+ if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.''.$tag.'>';
+ if ($direction > 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14"> '.$img.''.$tag.'>';
+ if (empty($notabs)) $s.='
';
return $s;
}