File indexing completed on 2025-01-26 05:29:07
0001 <?php 0002 0003 /** 0004 * XHTML 1.1 Presentation Module, defines simple presentation-related 0005 * markup. Text Extension Module. 0006 * @note The official XML Schema and DTD specs further divide this into 0007 * two modules: 0008 * - Block Presentation (hr) 0009 * - Inline Presentation (b, big, i, small, sub, sup, tt) 0010 * We have chosen not to heed this distinction, as content_sets 0011 * provides satisfactory disambiguation. 0012 */ 0013 class HTMLPurifier_HTMLModule_Presentation extends HTMLPurifier_HTMLModule 0014 { 0015 0016 /** 0017 * @type string 0018 */ 0019 public $name = 'Presentation'; 0020 0021 /** 0022 * @param HTMLPurifier_Config $config 0023 */ 0024 public function setup($config) 0025 { 0026 $this->addElement('hr', 'Block', 'Empty', 'Common'); 0027 $this->addElement('sub', 'Inline', 'Inline', 'Common'); 0028 $this->addElement('sup', 'Inline', 'Inline', 'Common'); 0029 $b = $this->addElement('b', 'Inline', 'Inline', 'Common'); 0030 $b->formatting = true; 0031 $big = $this->addElement('big', 'Inline', 'Inline', 'Common'); 0032 $big->formatting = true; 0033 $i = $this->addElement('i', 'Inline', 'Inline', 'Common'); 0034 $i->formatting = true; 0035 $small = $this->addElement('small', 'Inline', 'Inline', 'Common'); 0036 $small->formatting = true; 0037 $tt = $this->addElement('tt', 'Inline', 'Inline', 'Common'); 0038 $tt->formatting = true; 0039 } 0040 } 0041 0042 // vim: et sw=4 sts=4