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

[3.1.1] Implement %URI.SecureMunge and %URI.SecureMungeSecretKey, thanks Chris!

- URIFilter->prepare can return false in order to abort loading of the filter
- Implemented post URI filtering. Set member variable $post to true to set a URIFilter as such.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1772 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-05-26 16:26:47 +00:00
parent 3c4346cb1e
commit 322288e6c0
17 changed files with 215 additions and 28 deletions

View File

@@ -3,14 +3,16 @@
class HTMLPurifier_URIDefinitionTest extends HTMLPurifier_URIHarness
{
protected function createFilterMock($expect = true, $result = true) {
protected function createFilterMock($expect = true, $result = true, $post = false, $setup = true) {
static $i = 0;
generate_mock_once('HTMLPurifier_URIFilter');
$mock = new HTMLPurifier_URIFilterMock();
if ($expect) $mock->expectOnce('filter');
else $mock->expectNever('filter');
$mock->setReturnValue('filter', $result);
$mock->setReturnValue('prepare', $setup);
$mock->name = $i++;
$mock->post = $post;
return $mock;
}