Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.
   1  <?php
   2  
   3  class HTMLPurifier_HTMLModule_Tidy_Strict extends HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4
   4  {
   5      /**

   6       * @type string

   7       */
   8      public $name = 'Tidy_Strict';
   9  
  10      /**

  11       * @type string

  12       */
  13      public $defaultLevel = 'light';
  14  
  15      /**

  16       * @return array

  17       */
  18      public function makeFixes()
  19      {
  20          $r = parent::makeFixes();
  21          $r['blockquote#content_model_type'] = 'strictblockquote';
  22          return $r;
  23      }
  24  
  25      /**

  26       * @type bool

  27       */
  28      public $defines_child_def = true;
  29  
  30      /**

  31       * @param HTMLPurifier_ElementDef $def

  32       * @return HTMLPurifier_ChildDef_StrictBlockquote

  33       */
  34      public function getChildDef($def)
  35      {
  36          if ($def->content_model_type != 'strictblockquote') {
  37              return parent::getChildDef($def);
  38          }
  39          return new HTMLPurifier_ChildDef_StrictBlockquote($def->content_model);
  40      }
  41  }
  42  
  43  // vim: et sw=4 sts=4