mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 14:16:32 +02:00
Make %URI.Munge respect %URI.Host (don't munge).
%URI.Munge incorrectly munged URIs that pointed to the same host as the current website (it did, however, have the correct behavior for when the munge URL was on the same server). Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
@@ -117,6 +117,12 @@ class HTMLPurifier_URIFilter_MungeTest extends HTMLPurifier_URIFilterHarness
|
||||
$this->assertFiltering('http://example.com/foobar');
|
||||
}
|
||||
|
||||
function testMungeIgnoresSourceHost() {
|
||||
$this->config->set('URI.Host', 'foo.example.com');
|
||||
$this->setMunge('http://example.com/%s');
|
||||
$this->assertFiltering('http://foo.example.com/bar');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
Reference in New Issue
Block a user