mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-03 04:37:39 +02:00
[2.1.0]
. Introduce new text/itext configuration directive values: these represent longer strings that would be more appropriately edited with a textarea . Allow newlines to act as separators for lists, hashes, lookups and %HTML.Allowed git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1272 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -9,6 +9,10 @@ class HTMLPurifier_HTMLDefinitionTest extends UnitTestCase
|
||||
|
||||
$def = new HTMLPurifier_HTMLDefinition();
|
||||
|
||||
// note: this is case-sensitive, but its config schema
|
||||
// counterpart is not. This is generally a good thing for users,
|
||||
// but it's a slight internal inconsistency
|
||||
|
||||
$this->assertEqual(
|
||||
$def->parseTinyMCEAllowedList('a,b,c'),
|
||||
array(array('a' => true, 'b' => true, 'c' => true), array())
|
||||
@@ -35,6 +39,17 @@ class HTMLPurifier_HTMLDefinitionTest extends UnitTestCase
|
||||
array('span.style' => true, 'a.href' => true, 'a.title' => true))
|
||||
);
|
||||
|
||||
$this->assertEqual(
|
||||
// alternate form:
|
||||
$def->parseTinyMCEAllowedList(
|
||||
'span[style]
|
||||
strong
|
||||
a[href|title]
|
||||
'),
|
||||
array(array('span' => true, 'strong' => true, 'a' => true),
|
||||
array('span.style' => true, 'a.href' => true, 'a.title' => true))
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function test_Allowed() {
|
||||
|
Reference in New Issue
Block a user