on master help sign in
Merge pull request #368 from vtduncan/poster-url-attribute

Add "poster" as a URL attribute

commitb137a873015ecdfd053791722f242033aaa41fe7 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateMon 17 Aug 2015, 10:48 (11 years ago) parent72f2b6ce77564f
2 files changed+4−1
src/Hakyll/Web/Html.hs+1−1 tests/Hakyll/Web/Html/RelativizeUrls/Tests.hs+3
src/Hakyll/Web/Html.hs+1−1
@@ -55,7 +55,7 @@ demoteHeaders = withTags $ \tag -> case tag of
5555
5656--------------------------------------------------------------------------------
5757isUrlAttribute :: String -> Bool
58−isUrlAttribute = (`elem` ["src", "href", "data"])
58+isUrlAttribute = (`elem` ["src", "href", "data", "poster"])
5959
6060
6161--------------------------------------------------------------------------------
tests/Hakyll/Web/Html/RelativizeUrls/Tests.hs+3
@@ -22,6 +22,9 @@ tests = testGroup "Hakyll.Web.Html.RelativizeUrls.Tests" $
2222 relativizeUrlsWith ".." "<a href=\"/foo\">bar</a>"
2323 , "<img src=\"../../images/lolcat.png\" />" @=?
2424 relativizeUrlsWith "../.." "<img src=\"/images/lolcat.png\" />"
25+ , "<video poster=\"../../images/lolcat.png\"></video>" @=?
26+ relativizeUrlsWith "../.."
27+ "<video poster=\"/images/lolcat.png\"></video>"
2528 , "<a href=\"http://haskell.org\">Haskell</a>" @=?
2629 relativizeUrlsWith "../.."
2730 "<a href=\"http://haskell.org\">Haskell</a>"