diff --git a/lam/lib/html.inc b/lam/lib/html.inc
index 2c4899cf..071b75dc 100644
--- a/lam/lib/html.inc
+++ b/lam/lib/html.inc
@@ -2683,7 +2683,10 @@ class htmlLink extends htmlElement {
function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) {
$image = '';
if ($this->image != null) {
- $image = ' ';
+ $image = '';
+ if (!empty($this->text)) {
+ $image .= ' ';
+ }
}
$title = '';
if ($this->title != null) {