• File: List.php
  • Full Path: /var/www/crm_set/application/vendor/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/List.php
  • Date Modified: 09/21/2026 4:20 AM
  • File size: 774 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

/**
 * HTML5 extension to {@link HTMLPurifier_HTMLModule_List}
 *
 * @property HTMLPurifier_ElementDef[] $info
 */
class HTMLPurifier_HTMLModule_HTML5_List extends HTMLPurifier_HTMLModule_List
{
    /**
     * @type string
     */
    public $name = 'HTML5_List';

    /**
     * @param HTMLPurifier_Config $config
     */
    public function setup($config)
    {
        parent::setup($config);

        // https://html.spec.whatwg.org/multipage/grouping-content.html#the-ol-element
        $ol = $this->info['ol'];
        $ol->attr['reversed'] = 'Bool#reversed';

        // Attributes that were deprecated in HTML4, but reintroduced in HTML5
        $ol->attr['start'] = new HTMLPurifier_AttrDef_Integer();
        $ol->attr['type'] = 'Enum#s:1,a,A,i,I';
    }
}