summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-10-16 23:06:13 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-10-16 23:06:13 -0700
commit514958f5eaac17b6429118f8a59f10baeeb124fd (patch)
treef8f22400c2082d81e355fe7a00dacc2b3735cdaa /src/Text
parent61641f996fe339bf857530b9ae370e49cf54a4ac (diff)
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')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs1
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