Skip to content

Commit f0da217

Browse files
committed
Close img tags
1 parent b72efa3 commit f0da217

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/WebApp/BootstrapTheme/DefaultLayout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function renderNavbarBrand() {
8383
if ($logo != null) {
8484
if ((substr($logo, 0, 4) != 'http') && (substr($logo, 0, 1) != '/')) $logo = Utils::getImageBaseUrl().'/'.$logo;
8585
$size = $this->app->getBrandSize() != NULL ? $this->app->getBrandSize() : 30;
86-
$rc .= '<img src="'.$logo.'" style="margin-right: 10px;" alt="" loading="lazy" width="'.$size.'" height="'.$size.'">';
86+
$rc .= '<img src="'.$logo.'" style="margin-right: 10px;" alt="" loading="lazy" width="'.$size.'" height="'.$size.'"/>';
8787
}
8888
$rc .= $this->app->getBrandName();
8989
if ($link != null) $rc .= '</a>';

src/WebApp/DefaultTheme/ImageRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public function __construct($theme, $component) {
99
}
1010

1111
public function render() {
12-
return $this->renderStartTag('img');
12+
return $this->renderStartTag('img', TRUE);
1313
}
1414
}
1515

src/WebApp/Renderer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function setAria($key, $value) {
170170
return $this;
171171
}
172172

173-
protected function renderStartTag($tagName) {
173+
protected function renderStartTag($tagName, $closeTag = FALSE) {
174174
$rc = '<'.$tagName;
175175

176176
$rc .= ' id="'.htmlspecialchars($this->component->getId()).'"';
@@ -199,6 +199,7 @@ protected function renderStartTag($tagName) {
199199
}
200200
}
201201

202+
if ($closeTag) $rc .= '/';
202203
$rc .= '>';
203204
return $rc;
204205
}

0 commit comments

Comments
 (0)