2006-08-12 18:58:54 +00:00
|
|
|
<?php
|
|
|
|
|
2006-08-20 22:06:11 +00:00
|
|
|
/**
|
|
|
|
* Validates news (Usenet) as defined by generic RFC 1738
|
|
|
|
*/
|
2006-08-12 18:58:54 +00:00
|
|
|
class HTMLPurifier_URIScheme_news extends HTMLPurifier_URIScheme {
|
|
|
|
|
2007-11-25 02:24:39 +00:00
|
|
|
public $browsable = false;
|
2006-11-17 23:09:10 +00:00
|
|
|
|
2008-01-05 00:10:43 +00:00
|
|
|
public function validate(&$uri, $config, $context) {
|
2007-08-01 18:34:46 +00:00
|
|
|
parent::validate($uri, $config, $context);
|
|
|
|
$uri->userinfo = null;
|
|
|
|
$uri->host = null;
|
|
|
|
$uri->port = null;
|
|
|
|
$uri->query = null;
|
2006-08-12 18:58:54 +00:00
|
|
|
// typecode check needed on path
|
2007-08-01 18:34:46 +00:00
|
|
|
return true;
|
2006-08-12 18:58:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|