1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-03 04:37:39 +02:00
. 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:
Edward Z. Yang
2007-06-29 01:54:48 +00:00
parent b2ed0aff01
commit 5e5c0f3aa4
5 changed files with 43 additions and 7 deletions

View File

@@ -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() {