1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 03:10:09 +02:00

[1.4.0] Implemented background-image, background-repeat and background-attachment CSS properties. background shorthand property HAS NOT been extended to allow these, and background-position IS NOT implemented yet.

- Also: fixed up some flaky behavior in list-style shorthand, introduced uri_or_none

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@643 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-01-15 01:14:24 +00:00
parent aefda60696
commit d60f345cab
4 changed files with 32 additions and 16 deletions

View File

@@ -37,20 +37,20 @@ class HTMLPurifier_AttrDef_ListStyle extends HTMLPurifier_AttrDef
$caught['image'] = false;
$i = 0; // number of catches
$none = false;
foreach ($bits as $bit) {
if ($i >= 3) return; // optimization bit
if ($bit === '') continue;
foreach ($caught as $key => $status) {
if ($status !== false) continue;
if ($key == 'type' && $bit == 'none') {
// there's no none for image, since you simply
// omit it if you don't want to use it.
$r = 'none';
} else {
$r = $this->info['list-style-' . $key]->validate($bit, $config, $context);
}
$r = $this->info['list-style-' . $key]->validate($bit, $config, $context);
if ($r === false) continue;
if ($r === 'none') {
if ($none) continue;
else $none = true;
if ($key == 'image') continue;
}
$caught[$key] = $r;
$i++;
}