diff --git a/code/DocumentationParser.php b/code/DocumentationParser.php index c46dde3..c181a56 100755 --- a/code/DocumentationParser.php +++ b/code/DocumentationParser.php @@ -238,16 +238,16 @@ class DocumentationParser } // Rewrite URL (relative or absolute) - $baselink = DocumentationHelper::relativePath( + $baselink = DocumentationHelper::relativePath(DocumentationHelper::normalizePath( dirname($page->getPath()) - ); + )); // if the image starts with a slash, it's absolute if (substr($url, 0, 1) == '/') { - $relativeUrl = str_replace(BASE_PATH, '', Controller::join_links( + $relativeUrl = DocumentationHelper::normalizePath(str_replace(BASE_PATH, '', Controller::join_links( $page->getEntity()->getPath(), $url - )); + ))); } else { $relativeUrl = rtrim($baselink, '/') . '/' . ltrim($url, '/'); }