diff --git a/Classes/ViewHelpers/Misc/LinkViewHelper.php b/Classes/ViewHelpers/Misc/LinkViewHelper.php index 7653b26b8..46ff66621 100644 --- a/Classes/ViewHelpers/Misc/LinkViewHelper.php +++ b/Classes/ViewHelpers/Misc/LinkViewHelper.php @@ -37,8 +37,9 @@ public function render(): string if ($this->arguments['absolute'] === true) { $uri .= parse_url(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'), PHP_URL_SCHEME); $uri .= '://' . GeneralUtility::getIndpEnv('HTTP_HOST') . '/'; - $uri .= rtrim(GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'), '/'); + $uri .= trim(GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'), '/'); } - return $uri . $path; + + return rtrim($uri, '/') . '/' . ltrim($path, '/'); } }