diff --git a/lam/lib/html.inc b/lam/lib/html.inc index 095aea8a..3fd87278 100644 --- a/lam/lib/html.inc +++ b/lam/lib/html.inc @@ -3153,9 +3153,13 @@ class htmlLink extends htmlElement { * @return array List of input field names and their type (name => type) */ function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) { + $text = $this->getContent(); $image = ''; if ($this->image != null) { - $image = '' . $this->getAlt() . ' '; + $image = '' . $this->getAlt() . ''; + if (!empty($text)) { + $image .= ' '; + } } $title = ''; if ($this->title != null) { @@ -3178,7 +3182,7 @@ class htmlLink extends htmlElement { if (sizeof($this->cssClasses) > 0) { $classAttr = ' class="' . implode(' ', $this->cssClasses) . '"'; } - echo '' . $image . $this->getContent() . ''; + echo '' . $image . $text . ''; if ($this->showAsButton) { echo '