1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

Fix two bugs in MakeAbsolute filter involving base URIs that have empty path.

The bugs are:
* Undefined $is_folder variable when path is empty, and
* Improper concatenation of host and path together.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang
2008-07-05 03:12:44 -04:00
parent 965be3bd73
commit 594268ca3b
3 changed files with 14 additions and 1 deletions

View File

@@ -114,6 +114,13 @@ class HTMLPurifier_URIFilter_MakeAbsoluteTest extends HTMLPurifier_URIFilterHarn
$this->assertFiltering('javascript: window.location = \'http://www.example.com\';', false);
}
// miscellaneous
function testFilterDomainWithNoSlash() {
$this->setBase('http://example.com');
$this->assertFiltering('foo', 'http://example.com/foo');
}
// error case
function testErrorNoBase() {