File indexing completed on 2025-01-26 05:29:07

0001 <?php
0002 
0003 class HTMLPurifier_HTMLModule_Tidy_Strict extends HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4
0004 {
0005     /**
0006      * @type string
0007      */
0008     public $name = 'Tidy_Strict';
0009 
0010     /**
0011      * @type string
0012      */
0013     public $defaultLevel = 'light';
0014 
0015     /**
0016      * @return array
0017      */
0018     public function makeFixes()
0019     {
0020         $r = parent::makeFixes();
0021         $r['blockquote#content_model_type'] = 'strictblockquote';
0022         return $r;
0023     }
0024 
0025     /**
0026      * @type bool
0027      */
0028     public $defines_child_def = true;
0029 
0030     /**
0031      * @param HTMLPurifier_ElementDef $def
0032      * @return HTMLPurifier_ChildDef_StrictBlockquote
0033      */
0034     public function getChildDef($def)
0035     {
0036         if ($def->content_model_type != 'strictblockquote') {
0037             return parent::getChildDef($def);
0038         }
0039         return new HTMLPurifier_ChildDef_StrictBlockquote($def->content_model);
0040     }
0041 }
0042 
0043 // vim: et sw=4 sts=4