@@ -54,7 +54,8 @@ import Text.Pandoc.Templates (renderTemplate)
5454import Text.Pandoc.Walk
5555import Text.Pandoc.Writers.Math
5656import Text.Pandoc.Writers.Shared
57−import Text.Pandoc.XML (escapeStringForXML, fromEntities, toEntities)
57+import Text.Pandoc.XML (escapeStringForXML, fromEntities, toEntities,
58+ html5Attributes, html4Attributes, rdfaAttributes)
5859import qualified Text.Blaze.XHtml5 as H5
5960import qualified Text.Blaze.XHtml5.Attributes as A5
6061import Control.Monad.Except (throwError)
@@ -1310,349 +1311,3 @@ isRawHtml f = do
13101311 return $ f == Format "html" ||
13111312 ((html5 && f == Format "html5") || f == Format "html4")
13121313
1313−html5Attributes :: Set.Set Text
1314−html5Attributes = Set.fromList
1315− [ "abbr"
1316− , "accept"
1317− , "accept-charset"
1318− , "accesskey"
1319− , "action"
1320− , "allowfullscreen"
1321− , "allowpaymentrequest"
1322− , "allowusermedia"
1323− , "alt"
1324− , "as"
1325− , "async"
1326− , "autocomplete"
1327− , "autofocus"
1328− , "autoplay"
1329− , "charset"
1330− , "checked"
1331− , "cite"
1332− , "class"
1333− , "color"
1334− , "cols"
1335− , "colspan"
1336− , "content"
1337− , "contenteditable"
1338− , "controls"
1339− , "coords"
1340− , "crossorigin"
1341− , "data"
1342− , "datetime"
1343− , "default"
1344− , "defer"
1345− , "dir"
1346− , "dirname"
1347− , "disabled"
1348− , "download"
1349− , "draggable"
1350− , "enctype"
1351− , "for"
1352− , "form"
1353− , "formaction"
1354− , "formenctype"
1355− , "formmethod"
1356− , "formnovalidate"
1357− , "formtarget"
1358− , "headers"
1359− , "height"
1360− , "hidden"
1361− , "high"
1362− , "href"
1363− , "hreflang"
1364− , "http-equiv"
1365− , "id"
1366− , "inputmode"
1367− , "integrity"
1368− , "is"
1369− , "ismap"
1370− , "itemid"
1371− , "itemprop"
1372− , "itemref"
1373− , "itemscope"
1374− , "itemtype"
1375− , "kind"
1376− , "label"
1377− , "lang"
1378− , "list"
1379− , "loop"
1380− , "low"
1381− , "manifest"
1382− , "max"
1383− , "maxlength"
1384− , "media"
1385− , "method"
1386− , "min"
1387− , "minlength"
1388− , "multiple"
1389− , "muted"
1390− , "name"
1391− , "nomodule"
1392− , "nonce"
1393− , "novalidate"
1394− , "onabort"
1395− , "onafterprint"
1396− , "onauxclick"
1397− , "onbeforeprint"
1398− , "onbeforeunload"
1399− , "onblur"
1400− , "oncancel"
1401− , "oncanplay"
1402− , "oncanplaythrough"
1403− , "onchange"
1404− , "onclick"
1405− , "onclose"
1406− , "oncontextmenu"
1407− , "oncopy"
1408− , "oncuechange"
1409− , "oncut"
1410− , "ondblclick"
1411− , "ondrag"
1412− , "ondragend"
1413− , "ondragenter"
1414− , "ondragexit"
1415− , "ondragleave"
1416− , "ondragover"
1417− , "ondragstart"
1418− , "ondrop"
1419− , "ondurationchange"
1420− , "onemptied"
1421− , "onended"
1422− , "onerror"
1423− , "onfocus"
1424− , "onhashchange"
1425− , "oninput"
1426− , "oninvalid"
1427− , "onkeydown"
1428− , "onkeypress"
1429− , "onkeyup"
1430− , "onlanguagechange"
1431− , "onload"
1432− , "onloadeddata"
1433− , "onloadedmetadata"
1434− , "onloadend"
1435− , "onloadstart"
1436− , "onmessage"
1437− , "onmessageerror"
1438− , "onmousedown"
1439− , "onmouseenter"
1440− , "onmouseleave"
1441− , "onmousemove"
1442− , "onmouseout"
1443− , "onmouseover"
1444− , "onmouseup"
1445− , "onoffline"
1446− , "ononline"
1447− , "onpagehide"
1448− , "onpageshow"
1449− , "onpaste"
1450− , "onpause"
1451− , "onplay"
1452− , "onplaying"
1453− , "onpopstate"
1454− , "onprogress"
1455− , "onratechange"
1456− , "onrejectionhandled"
1457− , "onreset"
1458− , "onresize"
1459− , "onscroll"
1460− , "onsecuritypolicyviolation"
1461− , "onseeked"
1462− , "onseeking"
1463− , "onselect"
1464− , "onstalled"
1465− , "onstorage"
1466− , "onsubmit"
1467− , "onsuspend"
1468− , "ontimeupdate"
1469− , "ontoggle"
1470− , "onunhandledrejection"
1471− , "onunload"
1472− , "onvolumechange"
1473− , "onwaiting"
1474− , "onwheel"
1475− , "open"
1476− , "optimum"
1477− , "pattern"
1478− , "ping"
1479− , "placeholder"
1480− , "playsinline"
1481− , "poster"
1482− , "preload"
1483− , "readonly"
1484− , "referrerpolicy"
1485− , "rel"
1486− , "required"
1487− , "reversed"
1488− , "role"
1489− , "rows"
1490− , "rowspan"
1491− , "sandbox"
1492− , "scope"
1493− , "selected"
1494− , "shape"
1495− , "size"
1496− , "sizes"
1497− , "slot"
1498− , "span"
1499− , "spellcheck"
1500− , "src"
1501− , "srcdoc"
1502− , "srclang"
1503− , "srcset"
1504− , "start"
1505− , "step"
1506− , "style"
1507− , "tabindex"
1508− , "target"
1509− , "title"
1510− , "translate"
1511− , "type"
1512− , "typemustmatch"
1513− , "updateviacache"
1514− , "usemap"
1515− , "value"
1516− , "width"
1517− , "workertype"
1518− , "wrap"
1519− ]
1520−
1521−-- See https://en.wikipedia.org/wiki/RDFa, https://www.w3.org/TR/rdfa-primer/
1522−rdfaAttributes :: Set.Set Text
1523−rdfaAttributes = Set.fromList
1524− [ "about"
1525− , "rel"
1526− , "rev"
1527− , "src"
1528− , "href"
1529− , "resource"
1530− , "property"
1531− , "content"
1532− , "datatype"
1533− , "typeof"
1534− , "vocab"
1535− , "prefix"
1536− ]
1537−
1538−html4Attributes :: Set.Set Text
1539−html4Attributes = Set.fromList
1540− [ "abbr"
1541− , "accept"
1542− , "accept-charset"
1543− , "accesskey"
1544− , "action"
1545− , "align"
1546− , "alink"
1547− , "alt"
1548− , "archive"
1549− , "axis"
1550− , "background"
1551− , "bgcolor"
1552− , "border"
1553− , "cellpadding"
1554− , "cellspacing"
1555− , "char"
1556− , "charoff"
1557− , "charset"
1558− , "checked"
1559− , "cite"
1560− , "class"
1561− , "classid"
1562− , "clear"
1563− , "code"
1564− , "codebase"
1565− , "codetype"
1566− , "color"
1567− , "cols"
1568− , "colspan"
1569− , "compact"
1570− , "content"
1571− , "coords"
1572− , "data"
1573− , "datetime"
1574− , "declare"
1575− , "defer"
1576− , "dir"
1577− , "disabled"
1578− , "enctype"
1579− , "face"
1580− , "for"
1581− , "frame"
1582− , "frameborder"
1583− , "headers"
1584− , "height"
1585− , "href"
1586− , "hreflang"
1587− , "hspace"
1588− , "http-equiv"
1589− , "id"
1590− , "ismap"
1591− , "label"
1592− , "lang"
1593− , "language"
1594− , "link"
1595− , "longdesc"
1596− , "marginheight"
1597− , "marginwidth"
1598− , "maxlength"
1599− , "media"
1600− , "method"
1601− , "multiple"
1602− , "name"
1603− , "nohref"
1604− , "noresize"
1605− , "noshade"
1606− , "nowrap"
1607− , "object"
1608− , "onblur"
1609− , "onchange"
1610− , "onclick"
1611− , "ondblclick"
1612− , "onfocus"
1613− , "onkeydown"
1614− , "onkeypress"
1615− , "onkeyup"
1616− , "onload"
1617− , "onmousedown"
1618− , "onmousemove"
1619− , "onmouseout"
1620− , "onmouseover"
1621− , "onmouseup"
1622− , "onreset"
1623− , "onselect"
1624− , "onsubmit"
1625− , "onunload"
1626− , "profile"
1627− , "prompt"
1628− , "readonly"
1629− , "rel"
1630− , "rev"
1631− , "rows"
1632− , "rowspan"
1633− , "rules"
1634− , "scheme"
1635− , "scope"
1636− , "scrolling"
1637− , "selected"
1638− , "shape"
1639− , "size"
1640− , "span"
1641− , "src"
1642− , "standby"
1643− , "start"
1644− , "style"
1645− , "summary"
1646− , "tabindex"
1647− , "target"
1648− , "text"
1649− , "title"
1650− , "usemap"
1651− , "valign"
1652− , "value"
1653− , "valuetype"
1654− , "version"
1655− , "vlink"
1656− , "vspace"
1657− , "width"
1658− ]