3 HTMLPurifier_ConfigSchema
::define(
4 'Attr', 'AllowedFrameTargets', array(), 'lookup',
5 'Lookup table of all allowed link frame targets. Some commonly used '.
6 'link targets include _blank, _self, _parent and _top. Values should '.
7 'be lowercase, as validation will be done in a case-sensitive manner '.
8 'despite W3C\'s recommendation. XHTML 1.0 Strict does not permit '.
9 'the target attribute so this directive will have no effect in that '.
10 'doctype. XHTML 1.1 does not enable the Target module by default, you '.
11 'will have to manually enable it (see the module documentation for more details.)'
14 require_once 'HTMLPurifier/AttrDef/Enum.php';
17 * Special-case enum attribute definition that lazy loads allowed frame targets
19 class HTMLPurifier_AttrDef_HTML_FrameTarget
extends HTMLPurifier_AttrDef_Enum
22 var $valid_values = false; // uninitialized value
23 var $case_sensitive = false;
25 function HTMLPurifier_AttrDef_HTML_FrameTarget() {}
27 function validate($string, $config, &$context) {
28 if ($this->valid_values
=== false) $this->valid_values
= $config->get('Attr', 'AllowedFrameTargets');
29 return parent
::validate($string, $config, $context);