1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 14:16:32 +02:00

[1.3.0] Some housekeeping after the last commit

- Add a few missing unit tests
- Allow for spaces between comma separated strings to be transformed into arrays
- smoketests/printDefinition.php now has documentation, links to more documentation and a friendly user-interface

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@579 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-11-24 07:12:16 +00:00
parent 73a1e31fad
commit b63b0be21f
4 changed files with 46 additions and 7 deletions

View File

@@ -260,7 +260,13 @@ class HTMLPurifier_ConfigSchema {
case 'list':
case 'hash':
case 'lookup':
if (is_string($var)) $var = explode(',',$var);
if (is_string($var)) {
// simplistic string to array method that only works
// for simple lists of tag names or alphanumeric characters
$var = explode(',',$var);
// remove spaces
foreach ($var as $i => $j) $var[$i] = trim($j);
}
if (!is_array($var)) break;
$keys = array_keys($var);
if ($keys === array_keys($keys)) {