From 514958f5eaac17b6429118f8a59f10baeeb124fd Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 16 Oct 2017 23:06:13 -0700 Subject: HTML writer: don't add data- prefix to unknown attributes beginning with data-. Or we'll get data-data-blah. --- src/Text/Pandoc/Writers/HTML.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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 -- cgit v1.2.3