FrameTarget.php 570 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * Special-case enum attribute definition that lazy loads allowed frame targets
  4. */
  5. class HTMLPurifier_AttrDef_HTML_FrameTarget extends HTMLPurifier_AttrDef_Enum
  6. {
  7. public $valid_values = false; // uninitialized value
  8. protected $case_sensitive = false;
  9. public function __construct() {}
  10. public function validate($string, $config, $context) {
  11. if ($this->valid_values === false) $this->valid_values = $config->get('Attr.AllowedFrameTargets');
  12. return parent::validate($string, $config, $context);
  13. }
  14. }
  15. // vim: et sw=4 sts=4