Merge pull request #368 from vtduncan/poster-url-attribute

Add "poster" as a URL attribute
This commit is contained in:
Jasper Van der Jeugt 2015-08-17 10:48:05 +02:00
commit b137a87301
2 changed files with 4 additions and 1 deletions

View file

@ -55,7 +55,7 @@ demoteHeaders = withTags $ \tag -> case tag of
--------------------------------------------------------------------------------
isUrlAttribute :: String -> Bool
isUrlAttribute = (`elem` ["src", "href", "data"])
isUrlAttribute = (`elem` ["src", "href", "data", "poster"])
--------------------------------------------------------------------------------

View file

@ -22,6 +22,9 @@ tests = testGroup "Hakyll.Web.Html.RelativizeUrls.Tests" $
relativizeUrlsWith ".." "<a href=\"/foo\">bar</a>"
, "<img src=\"../../images/lolcat.png\" />" @=?
relativizeUrlsWith "../.." "<img src=\"/images/lolcat.png\" />"
, "<video poster=\"../../images/lolcat.png\"></video>" @=?
relativizeUrlsWith "../.."
"<video poster=\"/images/lolcat.png\"></video>"
, "<a href=\"http://haskell.org\">Haskell</a>" @=?
relativizeUrlsWith "../.."
"<a href=\"http://haskell.org\">Haskell</a>"