Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / lib / htmlpurifier / HTMLPurifier / AttrDef / HTML / FrameTarget.php
blobfdca8cb2ce29126d0805b789051c95eeb4db6156
1 <?php
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';
16 /**
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);