您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

41 行
893B

  1. <?php
  2. // VERY RELAXED! Shouldn't cause problems, not even Firefox checks if the
  3. // email is valid, but be careful!
  4. /**
  5. * Validates mailto (for E-mail) according to RFC 2368
  6. * @todo Validate the email address
  7. * @todo Filter allowed query parameters
  8. */
  9. class HTMLPurifier_URIScheme_mailto extends HTMLPurifier_URIScheme
  10. {
  11. /**
  12. * @type bool
  13. */
  14. public $browsable = false;
  15. /**
  16. * @type bool
  17. */
  18. public $may_omit_host = true;
  19. /**
  20. * @param HTMLPurifier_URI $uri
  21. * @param HTMLPurifier_Config $config
  22. * @param HTMLPurifier_Context $context
  23. * @return bool
  24. */
  25. public function doValidate(&$uri, $config, $context)
  26. {
  27. $uri->userinfo = null;
  28. $uri->host = null;
  29. $uri->port = null;
  30. // we need to validate path against RFC 2368's addr-spec
  31. return true;
  32. }
  33. }
  34. // vim: et sw=4 sts=4