diff --git a/dev/DebugView.php b/dev/DebugView.php
index 75844d1bd..b96061a0f 100644
--- a/dev/DebugView.php
+++ b/dev/DebugView.php
@@ -51,17 +51,18 @@ class DebugView {
*/
public function Breadcrumbs() {
$basePath = str_replace(Director::protocolAndHost(), '', Director::absoluteBaseURL());
- $parts = explode('/', str_replace($basePath, '', $_SERVER['REQUEST_URI']));
+ $relPath = parse_url(str_replace($basePath, '', $_SERVER['REQUEST_URI']), PHP_URL_PATH);
+ $parts = explode('/', $relPath);
$base = Director::absoluteBaseURL();
- $path = "";
$pathPart = "";
+ $pathLinks = array();
foreach($parts as $part) {
if ($part != '') {
$pathPart .= "$part/";
- $path .= "$part→ ";
+ $pathLinks[] = "$part";
}
}
- return $path;
+ return implode('→ ', $pathLinks);
}
/**