diff --git a/core/Controller/NavigationController.php b/core/Controller/NavigationController.php index db1d67cc77843..0996b41042ed5 100644 --- a/core/Controller/NavigationController.php +++ b/core/Controller/NavigationController.php @@ -115,7 +115,8 @@ private function generateETag(array $navigation): string { */ private function rewriteToAbsoluteUrls(array $navigation): array { foreach ($navigation as &$entry) { - if (!str_starts_with($entry['href'], $this->urlGenerator->getBaseUrl())) { + /* If parse_url finds no host it means the URL is not absolute */ + if (!isset(\parse_url($entry['href'])['host'])) { $entry['href'] = $this->urlGenerator->getAbsoluteURL($entry['href']); } if (!str_starts_with($entry['icon'], $this->urlGenerator->getBaseUrl())) {