Text.php 430 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Validates arbitrary text according to the HTML spec.
  4. */
  5. class HTMLPurifier_AttrDef_Text extends HTMLPurifier_AttrDef
  6. {
  7. /**
  8. * @param string $string
  9. * @param HTMLPurifier_Config $config
  10. * @param HTMLPurifier_Context $context
  11. * @return bool|string
  12. */
  13. public function validate($string, $config, $context)
  14. {
  15. return $this->parseCDATA($string);
  16. }
  17. }
  18. // vim: et sw=4 sts=4