Skip to content

Commit 1ac58d0

Browse files
[BUGFIX] Fix link rendering by using current ViewHelper tag instance (#1819)
Co-authored-by: Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
1 parent 32f3e33 commit 1ac58d0

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

Classes/ViewHelpers/LinkViewHelper.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,10 @@ public function render(): string
9898
$uri .= '#' . $this->arguments['section'];
9999
}
100100

101-
$tag = new static();
102-
$tag->tag->setTagName('a');
103-
$tag->tag->addAttribute('href', $uri);
104-
$tag->tag->setContent($childContent);
101+
$this->tag->addAttribute('href', $uri);
102+
$this->tag->setContent($childContent);
105103

106-
return $tag->tag->render();
104+
return $this->tag->render();
107105
}
108106

109107
/**

0 commit comments

Comments
 (0)