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