Created
August 9, 2012 12:10
-
-
Save lluchs/3303693 to your computer and use it in GitHub Desktop.
HTML Purifier definition for some HTML5 tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://developers.whatwg.org/sections.html | |
$def->addElement('section', 'Block', 'Flow', 'Common'); | |
$def->addElement('nav', 'Block', 'Flow', 'Common'); | |
$def->addElement('article', 'Block', 'Flow', 'Common'); | |
$def->addElement('aside', 'Block', 'Flow', 'Common'); | |
$def->addElement('header', 'Block', 'Flow', 'Common'); | |
$def->addElement('footer', 'Block', 'Flow', 'Common'); | |
// Content model actually excludes several tags, not modelled here | |
$def->addElement('address', 'Block', 'Flow', 'Common'); | |
$def->addElement('hgroup', 'Block', 'Required: h1 | h2 | h3 | h4 | h5 | h6', 'Common'); | |
// http://developers.whatwg.org/grouping-content.html | |
$def->addElement('figure', 'Block', 'Optional: (figcaption, Flow) | (Flow, figcaption) | Flow', 'Common'); | |
$def->addElement('figcaption', 'Inline', 'Flow', 'Common'); | |
// http://developers.whatwg.org/text-level-semantics.html | |
$def->addElement('s', 'Inline', 'Inline', 'Common'); | |
$def->addElement('var', 'Inline', 'Inline', 'Common'); | |
$def->addElement('sub', 'Inline', 'Inline', 'Common'); | |
$def->addElement('sup', 'Inline', 'Inline', 'Common'); | |
$def->addElement('mark', 'Inline', 'Inline', 'Common'); | |
$def->addElement('wbr', 'Inline', 'Empty', 'Core'); | |
// http://developers.whatwg.org/edits.html | |
$def->addElement('ins', 'Block', 'Flow', 'Common', array('cite' => 'URI', 'datetime' => 'CDATA')); | |
$def->addElement('del', 'Block', 'Flow', 'Common', array('cite' => 'URI', 'datetime' => 'CDATA')); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
quote missed