moo.com will catch moo.com.example.com. '. 'This directive has been available since 1.3.0.' ); class HTMLPurifier_URIFilter_HostBlacklist extends HTMLPurifier_URIFilter { var $name = 'HostBlacklist'; var $blacklist = array(); function prepare($config) { $this->blacklist = $config->get('URI', 'HostBlacklist'); } function filter(&$uri, $config, &$context) { foreach($this->blacklist as $blacklisted_host_fragment) { if (strpos($uri->host, $blacklisted_host_fragment) !== false) { return false; } } return true; } }