mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-22 13:42:53 +02:00
[2.1.4] [MFH] Color and CSS bugfixes from r1473
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/branches/php4@1710 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -11,6 +11,8 @@ class HTMLPurifier_AttrDef_CSS_ColorTest extends HTMLPurifier_AttrDefHarness
|
||||
$this->def = new HTMLPurifier_AttrDef_CSS_Color();
|
||||
|
||||
$this->assertDef('#F00');
|
||||
$this->assertDef('#fff');
|
||||
$this->assertDef('#eeeeee');
|
||||
$this->assertDef('#808080');
|
||||
$this->assertDef('rgb(255, 0, 0)', 'rgb(255,0,0)'); // rm spaces
|
||||
$this->assertDef('rgb(100%,0%,0%)');
|
||||
@@ -27,6 +29,11 @@ class HTMLPurifier_AttrDef_CSS_ColorTest extends HTMLPurifier_AttrDefHarness
|
||||
// color keywords, of course
|
||||
$this->assertDef('red', '#FF0000');
|
||||
|
||||
// malformed hex declaration
|
||||
$this->assertDef('808080', '#808080');
|
||||
$this->assertDef('000000', '#000000');
|
||||
$this->assertDef('fed', '#fed');
|
||||
|
||||
// maybe hex transformations would be another nice feature
|
||||
// at the very least transform rgb percent to rgb integer
|
||||
|
||||
|
Reference in New Issue
Block a user