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:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user