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

[1.7.0] Modify behavior of ElementDef->mergeIn to also merge safe property, this means default is now null.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1048 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-12 21:47:03 +00:00
parent cb9c96a2b0
commit bda9167423
2 changed files with 5 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ class HTMLPurifier_ElementDefTest extends UnitTestCase
'old' => true,
'removed-old' => true
);
$def1->safe = false;
$def2->standalone = false;
$def2->attr = array(
@@ -68,6 +69,7 @@ class HTMLPurifier_ElementDefTest extends UnitTestCase
'new' => true,
'removed-old' => false
);
$def2->safe = true;
$def1->mergeIn($def2);
$def1->mergeIn($def3); // empty, has no effect
@@ -97,6 +99,7 @@ class HTMLPurifier_ElementDefTest extends UnitTestCase
'old' => true,
'new' => true
));
$this->assertIdentical($def1->safe, true);
}