MediaWiki REL1_31
MediaWiki\Tidy\BalanceSets Class Reference

Utility constants and sets for the HTML5 tree building algorithm. More...

Static Public Member Functions

static inButtonScopeSet ()
 
static inListItemScopeSet ()
 

Public Attributes

const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'
 
const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'
 
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg'
 

Static Public Attributes

static $addressDivPSet
 
static $emptyElementSet
 
static $extraLinefeedSet
 
static $formAssociatedSet
 
static $headingSet
 
static $htmlIntegrationPointSet
 
static $impliedEndTagsSet
 
static $inInvertedSelectScopeSet
 
static $inScopeSet
 
static $inTableScopeSet
 
static $mathmlTextIntegrationPointSet
 
static $specialSet
 
static $tableBodyContextSet
 
static $tableCellSet
 
static $tableContextSet
 
static $tableRowContextSet
 
static $tableSectionRowSet
 
static $thoroughImpliedEndTagsSet
 
static $tidyInlineSet
 
static $tidyPWrapSet
 
static $unsupportedSet
 

Static Private Attributes

static $inButtonScopeSet = null
 
static $inListItemScopeSet = null
 

Detailed Description

Utility constants and sets for the HTML5 tree building algorithm.

Sets are associative arrays indexed first by namespace and then by lower-cased tag name.

Since
1.27

Definition at line 70 of file Balancer.php.

Member Function Documentation

◆ inButtonScopeSet()

static MediaWiki\Tidy\BalanceSets::inButtonScopeSet ( )
static

◆ inListItemScopeSet()

static MediaWiki\Tidy\BalanceSets::inListItemScopeSet ( )
static

Member Data Documentation

◆ $addressDivPSet

MediaWiki\Tidy\BalanceSets::$addressDivPSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'address' => true, 'div' => true, 'p' => true
]
]
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
Definition hooks.txt:2006

Definition at line 145 of file Balancer.php.

Referenced by MediaWiki\Tidy\Balancer\inBodyMode().

◆ $emptyElementSet

MediaWiki\Tidy\BalanceSets::$emptyElementSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'area' => true, 'base' => true, 'basefont' => true,
'bgsound' => true, 'br' => true, 'col' => true, 'command' => true,
'embed' => true, 'frame' => true, 'hr' => true, 'img' => true,
'input' => true, 'keygen' => true, 'link' => true, 'meta' => true,
'param' => true, 'source' => true, 'track' => true, 'wbr' => true
]
]

Definition at line 86 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceElement\__toString().

◆ $extraLinefeedSet

MediaWiki\Tidy\BalanceSets::$extraLinefeedSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'pre' => true, 'textarea' => true, 'listing' => true,
]
]

Definition at line 96 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceElement\flatten().

◆ $formAssociatedSet

MediaWiki\Tidy\BalanceSets::$formAssociatedSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'button' => true, 'fieldset' => true, 'input' => true,
'keygen' => true, 'object' => true, 'output' => true,
'select' => true, 'textarea' => true, 'img' => true
]
]

Definition at line 202 of file Balancer.php.

◆ $headingSet

MediaWiki\Tidy\BalanceSets::$headingSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'h1' => true, 'h2' => true, 'h3' => true,
'h4' => true, 'h5' => true, 'h6' => true
]
]

Definition at line 102 of file Balancer.php.

Referenced by MediaWiki\Tidy\Balancer\inBodyMode().

◆ $htmlIntegrationPointSet

MediaWiki\Tidy\BalanceSets::$htmlIntegrationPointSet
static
Initial value:
= [
self::SVG_NAMESPACE => [
'foreignobject' => true,
'desc' => true,
'title' => true
]
]

Definition at line 264 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceElement\isHtmlIntegrationPoint().

◆ $impliedEndTagsSet

MediaWiki\Tidy\BalanceSets::$impliedEndTagsSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'dd' => true, 'dt' => true, 'li' => true,
'menuitem' => true, 'optgroup' => true,
'option' => true, 'p' => true, 'rb' => true, 'rp' => true,
'rt' => true, 'rtc' => true
]
]

Definition at line 158 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceStack\generateImpliedEndTags().

◆ $inButtonScopeSet

MediaWiki\Tidy\BalanceSets::$inButtonScopeSet = null
staticprivate

Definition at line 236 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceSets\inButtonScopeSet().

◆ $inInvertedSelectScopeSet

MediaWiki\Tidy\BalanceSets::$inInvertedSelectScopeSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'option' => true, 'optgroup' => true
]
]

Definition at line 251 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceStack\inSelectScope().

◆ $inListItemScopeSet

MediaWiki\Tidy\BalanceSets::$inListItemScopeSet = null
staticprivate

Definition at line 226 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceSets\inListItemScopeSet().

◆ $inScopeSet

MediaWiki\Tidy\BalanceSets::$inScopeSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'applet' => true, 'caption' => true, 'html' => true,
'marquee' => true, 'object' => true,
'table' => true, 'td' => true, 'template' => true,
'th' => true
],
self::SVG_NAMESPACE => [
'foreignobject' => true, 'desc' => true, 'title' => true
],
self::MATHML_NAMESPACE => [
'mi' => true, 'mo' => true, 'mn' => true, 'ms' => true,
'mtext' => true, 'annotation-xml' => true
]
]

Definition at line 210 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceSets\inButtonScopeSet(), MediaWiki\Tidy\BalanceSets\inListItemScopeSet(), and MediaWiki\Tidy\BalanceStack\inScope().

◆ $inTableScopeSet

MediaWiki\Tidy\BalanceSets::$inTableScopeSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'html' => true, 'table' => true, 'template' => true
]
]

Definition at line 245 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceStack\inTableScope().

◆ $mathmlTextIntegrationPointSet

MediaWiki\Tidy\BalanceSets::$mathmlTextIntegrationPointSet
static
Initial value:
= [
self::MATHML_NAMESPACE => [
'mi' => true, 'mo' => true, 'mn' => true, 'ms' => true,
'mtext' => true
]
]

Definition at line 257 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceElement\isMathmlTextIntegrationPoint().

◆ $specialSet

MediaWiki\Tidy\BalanceSets::$specialSet
static

◆ $tableBodyContextSet

MediaWiki\Tidy\BalanceSets::$tableBodyContextSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'tbody' => true, 'tfoot' => true, 'thead' => true,
'template' => true, 'html' => true
]
]

Definition at line 188 of file Balancer.php.

Referenced by MediaWiki\Tidy\Balancer\endSection(), and MediaWiki\Tidy\Balancer\inTableBodyMode().

◆ $tableCellSet

MediaWiki\Tidy\BalanceSets::$tableCellSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'td' => true, 'th' => true
]
]

Definition at line 177 of file Balancer.php.

Referenced by MediaWiki\Tidy\Balancer\inCellMode(), and MediaWiki\Tidy\Balancer\resetInsertionMode().

◆ $tableContextSet

MediaWiki\Tidy\BalanceSets::$tableContextSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'table' => true, 'template' => true, 'html' => true
]
]

Definition at line 182 of file Balancer.php.

Referenced by MediaWiki\Tidy\Balancer\inTableMode().

◆ $tableRowContextSet

MediaWiki\Tidy\BalanceSets::$tableRowContextSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'tr' => true, 'template' => true, 'html' => true
]
]

Definition at line 195 of file Balancer.php.

Referenced by MediaWiki\Tidy\Balancer\endRow(), and MediaWiki\Tidy\Balancer\inRowMode().

◆ $tableSectionRowSet

MediaWiki\Tidy\BalanceSets::$tableSectionRowSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'table' => true, 'thead' => true, 'tbody' => true,
'tfoot' => true, 'tr' => true
]
]

Definition at line 151 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceStack\adoptionAgency(), MediaWiki\Tidy\BalanceStack\insertElement(), MediaWiki\Tidy\BalanceStack\insertText(), and MediaWiki\Tidy\Balancer\inTableMode().

◆ $thoroughImpliedEndTagsSet

MediaWiki\Tidy\BalanceSets::$thoroughImpliedEndTagsSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'caption' => true, 'colgroup' => true, 'dd' => true, 'dt' => true,
'li' => true, 'optgroup' => true, 'option' => true, 'p' => true,
'rb' => true, 'rp' => true, 'rt' => true, 'rtc' => true,
'tbody' => true, 'td' => true, 'tfoot' => true, 'th' => true,
'thead' => true, 'tr' => true
]
]

Definition at line 167 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceStack\generateImpliedEndTags().

◆ $tidyInlineSet

MediaWiki\Tidy\BalanceSets::$tidyInlineSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'a' => true, 'abbr' => true, 'acronym' => true, 'applet' => true,
'b' => true, 'basefont' => true, 'bdo' => true, 'big' => true,
'br' => true, 'button' => true, 'cite' => true, 'code' => true,
'dfn' => true, 'em' => true, 'font' => true, 'i' => true,
'iframe' => true, 'img' => true, 'input' => true, 'kbd' => true,
'label' => true, 'legend' => true, 'map' => true, 'object' => true,
'param' => true, 'q' => true, 'rb' => true, 'rbc' => true,
'rp' => true, 'rt' => true, 'rtc' => true, 'ruby' => true,
's' => true, 'samp' => true, 'select' => true, 'small' => true,
'span' => true, 'strike' => true, 'strong' => true, 'sub' => true,
'sup' => true, 'textarea' => true, 'tt' => true, 'u' => true,
'var' => true,
'video' => true, 'audio' => true, 'bdi' => true, 'data' => true,
'time' => true, 'mark' => true,
],
]

Definition at line 283 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceStack\insertElement().

◆ $tidyPWrapSet

MediaWiki\Tidy\BalanceSets::$tidyPWrapSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'body' => true, 'blockquote' => true,
'html' => true,
],
]

Definition at line 273 of file Balancer.php.

Referenced by MediaWiki\Tidy\BalanceStack\fosterParent(), and MediaWiki\Tidy\BalanceStack\insertText().

◆ $unsupportedSet

MediaWiki\Tidy\BalanceSets::$unsupportedSet
static
Initial value:
= [
self::HTML_NAMESPACE => [
'html' => true, 'head' => true, 'body' => true, 'frameset' => true,
'frame' => true,
'plaintext' => true,
'xmp' => true, 'iframe' => true, 'noembed' => true,
'noscript' => true, 'script' => true,
'title' => true
]
]

Definition at line 75 of file Balancer.php.

Referenced by MediaWiki\Tidy\Balancer\__construct(), and MediaWiki\Tidy\Balancer\insertToken().

◆ HTML_NAMESPACE

◆ MATHML_NAMESPACE

const MediaWiki\Tidy\BalanceSets::MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'

◆ SVG_NAMESPACE

const MediaWiki\Tidy\BalanceSets::SVG_NAMESPACE = 'http://www.w3.org/2000/svg'

Definition at line 73 of file Balancer.php.

Referenced by MediaWiki\Tidy\Balancer\inBodyMode().


The documentation for this class was generated from the following file: