You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
702B

  1. <?php
  2. /**
  3. * Validates news (Usenet) as defined by generic RFC 1738
  4. */
  5. class HTMLPurifier_URIScheme_news extends HTMLPurifier_URIScheme
  6. {
  7. /**
  8. * @type bool
  9. */
  10. public $browsable = false;
  11. /**
  12. * @type bool
  13. */
  14. public $may_omit_host = true;
  15. /**
  16. * @param HTMLPurifier_URI $uri
  17. * @param HTMLPurifier_Config $config
  18. * @param HTMLPurifier_Context $context
  19. * @return bool
  20. */
  21. public function doValidate(&$uri, $config, $context)
  22. {
  23. $uri->userinfo = null;
  24. $uri->host = null;
  25. $uri->port = null;
  26. $uri->query = null;
  27. // typecode check needed on path
  28. return true;
  29. }
  30. }
  31. // vim: et sw=4 sts=4