From 10ef060624bcda08df3b34c6ca36960e1c725981 Mon Sep 17 00:00:00 2001 From: UndefinedOffset Date: Fri, 11 Mar 2016 10:38:52 -0400 Subject: [PATCH] BUGFIX: Fixed case where image paths could end up having a backslash on windows --- code/DocumentationParser.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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, '/'); }