Skip to content

Commit

Permalink
[BUGFIX] Force closing tag in PageViewHelper
Browse files Browse the repository at this point in the history
Unlike all the other link viewhelpers (based on tagbuilder),
the PageViewHelper does not force the closing tag which
results in an invalid tag when there is no content available.

Resolves: #87804
Releases: master, 9.5, 8.7
Change-Id: Ia49aaf1f2f80be4fa3febee08f5285bebd2c0189
Reviewed-on: https://review.typo3.org/c/59811
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Guido Schmechel <guido.schmechel@brandung.de>
Tested-by: Richard Haeser <richard@maxserv.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Richard Haeser <richard@maxserv.com>
Reviewed-by: André Schließer <andy.schliesser@gmail.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Guido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
RinyVT authored and bmack committed Mar 4, 2019
1 parent fea833c commit d9ceaf6
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public function render()
if ((string)$uri !== '') {
$this->tag->addAttribute('href', $uri);
$this->tag->setContent($this->renderChildren());
$this->tag->forceClosingTag(true);
$result = $this->tag->render();
} else {
$result = $this->renderChildren();
Expand Down

0 comments on commit d9ceaf6

Please sign in to comment.