Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.
   1  <?php
   2  
   3  /**
   4   * XHTML 1.1 Hypertext Module, defines hypertext links. Core Module.
   5   */
   6  class HTMLPurifier_HTMLModule_Hypertext extends HTMLPurifier_HTMLModule
   7  {
   8  
   9      /**
  10       * @type string
  11       */
  12      public $name = 'Hypertext';
  13  
  14      /**
  15       * @param HTMLPurifier_Config $config
  16       */
  17      public function setup($config)
  18      {
  19          $a = $this->addElement(
  20              'a',
  21              'Inline',
  22              'Inline',
  23              'Common',
  24              array(
  25                  // 'accesskey' => 'Character',
  26                  // 'charset' => 'Charset',
  27                  'href' => 'URI',
  28                  // 'hreflang' => 'LanguageCode',
  29                  'rel' => new HTMLPurifier_AttrDef_HTML_LinkTypes('rel'),
  30                  'rev' => new HTMLPurifier_AttrDef_HTML_LinkTypes('rev'),
  31                  // 'tabindex' => 'Number',
  32                  // 'type' => 'ContentType',
  33              )
  34          );
  35          $a->formatting = true;
  36          $a->excludes = array('a' => true);
  37      }
  38  }
  39  
  40  // vim: et sw=4 sts=4