news.php 499 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 function validate(&$uri, $config, $context) {
  8. parent::validate($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