ContentEditable.php 416 B

12345678910111213141516
  1. <?php
  2. class HTMLPurifier_AttrDef_HTML_ContentEditable extends HTMLPurifier_AttrDef
  3. {
  4. public function validate($string, $config, $context)
  5. {
  6. $allowed = array('false');
  7. if ($config->get('HTML.Trusted')) {
  8. $allowed = array('', 'true', 'false');
  9. }
  10. $enum = new HTMLPurifier_AttrDef_Enum($allowed);
  11. return $enum->validate($string, $config, $context);
  12. }
  13. }