diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-10-16 23:06:13 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-10-16 23:06:13 -0700 |
commit | 514958f5eaac17b6429118f8a59f10baeeb124fd (patch) | |
tree | f8f22400c2082d81e355fe7a00dacc2b3735cdaa /src/Text/Pandoc | |
parent | 61641f996fe339bf857530b9ae370e49cf54a4ac (diff) | |
download | pandoc-514958f5eaac17b6429118f8a59f10baeeb124fd.tar.gz |
HTML writer: don't add data- prefix to unknown attributes beginning with data-.
Or we'll get data-data-blah.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 41b50bf70..f197bceb2 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -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 |