diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8a0dda0c2fc..734f6f229c1 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7297,14 +7297,23 @@ class Form { $ret .= ''; } - elseif ($fieldref != 'none') $ret .= dol_htmlentities($object->$fieldref); - + elseif ($fieldref != 'none') + { + $ret.=dol_htmlentities($object->$fieldref); + } if ($morehtmlref) { - $ret .= ' '.$morehtmlref; + // don't add a additional space, when "$morehtmlref" starts with a HTML div tag + if(substr($morehtmlref, 0, 4) != '