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

Basic color keywords translated into hexadecimal values.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@323 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-08-27 00:35:57 +00:00
parent 5169fc7a3b
commit ffe39d7f30
3 changed files with 31 additions and 0 deletions

View File

@@ -23,6 +23,9 @@ class HTMLPurifier_AttrDef_ColorTest extends HTMLPurifier_AttrDefHarness
$this->assertDef('rgb(200%, -10%, 0%)', 'rgb(100%,0%,0%)');
$this->assertDef('rgb(256,-23,34)', 'rgb(255,0,34)');
// color keywords, of course
$this->assertDef('red', '#F00');
// maybe hex transformations would be another nice feature
// at the very least transform rgb percent to rgb integer