on master help sign in
Merge pull request #41 from irv/master

Don't relativize urls that lead with "//"

commitc8a970d64bdddc1e8655ac1ebf5d028d1bf6a021 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateMon 3 Oct 2011, 00:26 (15 years ago) parent704bef924ce687
1 file changed+1−1
src/Hakyll/Web/Urls/Relativize.hs+1−1
src/Hakyll/Web/Urls/Relativize.hs+1−1
@@ -44,4 +44,4 @@ relativizeUrls :: String -- ^ Path to the site root
4444 -> String -- ^ Resulting HTML
4545relativizeUrls root = withUrls rel
4646 where
47− rel x = if "/" `isPrefixOf` x then root ++ x else x
47+ rel x = if "/" `isPrefixOf` x && not ("//" `isPrefixOf` x) then root ++ x else x