HTML writer: don't add data- prefix to unknown attributes beginning with data-.

Or we'll get data-data-blah.
This commit is contained in:
John MacFarlane 2017-10-16 23:06:13 -07:00
parent 61641f996f
commit 514958f5ea

View file

@ -551,6 +551,7 @@ toAttrs kvs = do
return $ map (\(x,y) ->
customAttribute
(fromString (if not html5 || x `Set.member` html5Attributes
|| "data-" `isPrefixOf` x
then x
else "data-" ++ x)) (toValue y)) kvs