1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-03 20:58:11 +02:00

[1.4.0] Implement 'background' shorthand CSS property.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@663 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-01-20 02:21:43 +00:00
parent c24916e1d6
commit d693c4ea09
8 changed files with 120 additions and 10 deletions

View File

@@ -12,6 +12,8 @@ require_once 'HTMLPurifier/AttrDef/Font.php';
require_once 'HTMLPurifier/AttrDef/Border.php';
require_once 'HTMLPurifier/AttrDef/ListStyle.php';
require_once 'HTMLPurifier/AttrDef/CSSURI.php';
require_once 'HTMLPurifier/AttrDef/BackgroundPosition.php';
require_once 'HTMLPurifier/AttrDef/Background.php';
/**
* Defines allowed CSS attributes and what their values are.
@@ -81,9 +83,6 @@ class HTMLPurifier_CSSDefinition
);
$this->info['background-position'] = new HTMLPurifier_AttrDef_BackgroundPosition();
// pending its own validator as a shorthand
$this->info['background'] =
$border_color =
$this->info['border-top-color'] =
$this->info['border-bottom-color'] =
@@ -94,6 +93,8 @@ class HTMLPurifier_CSSDefinition
new HTMLPurifier_AttrDef_Color()
));
$this->info['background'] = new HTMLPurifier_AttrDef_Background($config);
$this->info['border-color'] = new HTMLPurifier_AttrDef_Multiple($border_color);
$border_width =