diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-10-03 00:26:28 -0700 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-10-03 00:26:28 -0700 |
commit | c8a970d64bdddc1e8655ac1ebf5d028d1bf6a021 (patch) | |
tree | 490319aa0cdb7f4601230b9ae6aeb123b0485bea | |
parent | 704bef94418f1e16b72ade8c0b81987c1496bd80 (diff) | |
parent | 24ce6878738ed8fc5e124c21e1ebfb4895f670e5 (diff) | |
download | hakyll-c8a970d64bdddc1e8655ac1ebf5d028d1bf6a021.tar.gz |
Merge pull request #41 from irv/master
Don't relativize urls that lead with "//"
-rw-r--r-- | src/Hakyll/Web/Urls/Relativize.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Hakyll/Web/Urls/Relativize.hs b/src/Hakyll/Web/Urls/Relativize.hs index f4b7a6c..0b7df4e 100644 --- a/src/Hakyll/Web/Urls/Relativize.hs +++ b/src/Hakyll/Web/Urls/Relativize.hs @@ -44,4 +44,4 @@ relativizeUrls :: String -- ^ Path to the site root -> String -- ^ Resulting HTML relativizeUrls root = withUrls rel where - rel x = if "/" `isPrefixOf` x then root ++ x else x + rel x = if "/" `isPrefixOf` x && not ("//" `isPrefixOf` x) then root ++ x else x |