on master help sign in
Don't relativize urls that lead with "//".

Used to reference absolute ath in another domain, without hardcoding protocol (so it works with http or https, and your browser won't complain about unsecure content) Example: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>

commit24ce6878738ed8fc5e124c21e1ebfb4895f670e5 authorAndy Irving <andy@soundforsound.co.uk> dateSun 2 Oct 2011, 15:20 (15 years ago) parent704bef9
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