diff --git a/retriever/retriever.php b/retriever/retriever.php
index c0f6f935e..31db037ea 100644
--- a/retriever/retriever.php
+++ b/retriever/retriever.php
@@ -671,7 +671,7 @@ function retriever_globalise_urls(DOMDocument $doc, array $resource) {
return $doc;
}
$rooturl = $components['scheme'] . "://" . $components['host'];
- $dirurl = $rooturl . dirname($components['path']) . "/";
+ $dirurl = $rooturl . dirname($components['path']);
$params = array('$dirurl' => $dirurl, '$rooturl' => $rooturl);
$fix_urls_template = Renderer::getMarkupTemplate('fix-urls.tpl', 'addon/retriever/');
$fix_urls_xslt = Renderer::replaceMacros($fix_urls_template, $params);
diff --git a/retriever/templates/fix-urls.tpl b/retriever/templates/fix-urls.tpl
index 1d59938c3..ae2452fcd 100644
--- a/retriever/templates/fix-urls.tpl
+++ b/retriever/templates/fix-urls.tpl
@@ -14,7 +14,7 @@
-
+
@@ -22,7 +22,7 @@
-
+