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

[1.7.0] Complete Legacy element and attribute native support.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1115 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-29 16:51:32 +00:00
parent 9c5f01a0cf
commit 426fbd1f97
8 changed files with 159 additions and 35 deletions

View File

@@ -47,11 +47,18 @@ class HTMLPurifier_AttrDef_Enum extends HTMLPurifier_AttrDef
/**
* @param $string In form of comma-delimited list of case-insensitive
* valid values. Example: "foo,bar,baz"
* valid values. Example: "foo,bar,baz". Prepend "s:" to make
* case sensitive
*/
function make($string) {
if (strlen($string) > 2 && $string[0] == 's' && $string[1] == ':') {
$string = substr($string, 2);
$sensitive = true;
} else {
$sensitive = false;
}
$values = explode(',', $string);
return new HTMLPurifier_AttrDef_Enum($values);
return new HTMLPurifier_AttrDef_Enum($values, $sensitive);
}
}