File indexing completed on 2025-02-02 05:43:42
0001 <?php 0002 0003 /** 0004 * Special-case enum attribute definition that lazy loads allowed frame targets 0005 */ 0006 class HTMLPurifier_AttrDef_HTML_FrameTarget extends HTMLPurifier_AttrDef_Enum 0007 { 0008 0009 /** 0010 * @type array 0011 */ 0012 public $valid_values = false; // uninitialized value 0013 0014 /** 0015 * @type bool 0016 */ 0017 protected $case_sensitive = false; 0018 0019 public function __construct() 0020 { 0021 } 0022 0023 /** 0024 * @param string $string 0025 * @param HTMLPurifier_Config $config 0026 * @param HTMLPurifier_Context $context 0027 * @return bool|string 0028 */ 0029 public function validate($string, $config, $context) 0030 { 0031 if ($this->valid_values === false) { 0032 $this->valid_values = $config->get('Attr.AllowedFrameTargets'); 0033 } 0034 return parent::validate($string, $config, $context); 0035 } 0036 } 0037 0038 // vim: et sw=4 sts=4