mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 16:31:53 +00:00
Actually make URI.DisableResources do something.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
parent
8c9d461a62
commit
31dce298ea
@ -26,6 +26,7 @@ class HTMLPurifier_URIDefinition extends HTMLPurifier_Definition
|
||||
public function __construct() {
|
||||
$this->registerFilter(new HTMLPurifier_URIFilter_DisableExternal());
|
||||
$this->registerFilter(new HTMLPurifier_URIFilter_DisableExternalResources());
|
||||
$this->registerFilter(new HTMLPurifier_URIFilter_DisableResources());
|
||||
$this->registerFilter(new HTMLPurifier_URIFilter_HostBlacklist());
|
||||
$this->registerFilter(new HTMLPurifier_URIFilter_SafeIframe());
|
||||
$this->registerFilter(new HTMLPurifier_URIFilter_MakeAbsolute());
|
||||
|
@ -36,6 +36,11 @@ class HTMLPurifierTest extends HTMLPurifier_Harness
|
||||
);
|
||||
}
|
||||
|
||||
function testDisableResources() {
|
||||
$this->config->set('URI.DisableResources', true);
|
||||
$this->assertPurification('<img src="foo.jpg" />', '');
|
||||
}
|
||||
|
||||
function test_addFilter_deprecated() {
|
||||
$this->expectError('HTMLPurifier->addFilter() is deprecated, use configuration directives in the Filter namespace or Filter.Custom');
|
||||
generate_mock_once('HTMLPurifier_Filter');
|
||||
|
Loading…
Reference in New Issue
Block a user