1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-05 21:57:26 +02:00

Actually make URI.DisableResources do something.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
Edward Z. Yang
2010-06-30 05:59:17 -07:00
parent 1bed8b6d5f
commit c04a441b3e
4 changed files with 42 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
<?php
class HTMLPurifier_URIFilter_DisableResourcesTest extends HTMLPurifier_URIFilterHarness
{
function setUp() {
parent::setUp();
$this->filter = new HTMLPurifier_URIFilter_DisableResources();
$var = true;
$this->context->register('EmbeddedURI', $var);
}
function testRemoveResource() {
$this->assertFiltering('/foo/bar', false);
}
function testPreserveRegular() {
$this->context->destroy('EmbeddedURI'); // undo setUp
$this->assertFiltering('/foo/bar');
}
}
// vim: et sw=4 sts=4