news.php 484 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Validates news (Usenet) as defined by generic RFC 1738
  4. */
  5. class HTMLPurifier_URIScheme_news extends HTMLPurifier_URIScheme {
  6. public $browsable = false;
  7. public $may_omit_host = true;
  8. public function doValidate(&$uri, $config, $context) {
  9. $uri->userinfo = null;
  10. $uri->host = null;
  11. $uri->port = null;
  12. $uri->query = null;
  13. // typecode check needed on path
  14. return true;
  15. }
  16. }
  17. // vim: et sw=4 sts=4