3 class HTMLPurifier_URIFilter_DisableExternalTest
extends HTMLPurifier_URIFilterHarness
8 $this->filter
= new HTMLPurifier_URIFilter_DisableExternal();
11 function testRemoveExternal() {
12 $this->assertFiltering(
13 'http://example.com', false
17 function testPreserveInternal() {
18 $this->assertFiltering(
23 function testPreserveOurHost() {
24 $this->config
->set('URI.Host', 'example.com');
25 $this->assertFiltering(
30 function testPreserveOurSubdomain() {
31 $this->config
->set('URI.Host', 'example.com');
32 $this->assertFiltering(
33 'http://www.example.com'
37 function testRemoveSuperdomain() {
38 $this->config
->set('URI.Host', 'www.example.com');
39 $this->assertFiltering(
40 'http://example.com', false
44 function testBaseAsHost() {
45 $this->config
->set('URI.Base', 'http://www.example.com/foo/bar');
46 $this->assertFiltering(
47 'http://www.example.com/baz'