mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 19:30:21 +02:00
Fix mungeRgb to handle percent, float and hsl values
This commit is contained in:
@@ -12,12 +12,18 @@ class HTMLPurifier_AttrDef_CSS_BackgroundTest extends HTMLPurifier_AttrDefHarnes
|
||||
$this->assertDef($valid);
|
||||
$this->assertDef('url(\'chess.png\') #333 50% top repeat fixed', $valid);
|
||||
$this->assertDef(
|
||||
'rgb(34, 56, 33) url(chess.png) repeat fixed top',
|
||||
'rgb(34,56,33) url("chess.png") repeat fixed top'
|
||||
'rgb(34%, 56%, 33%) url(chess.png) repeat fixed top',
|
||||
'rgb(34%,56%,33%) url("chess.png") repeat fixed top'
|
||||
);
|
||||
$this->assertDef(
|
||||
'rgba(74, 12, 85, 0.35) repeat fixed bottom',
|
||||
'rgba(74,12,85,.35) repeat fixed bottom'
|
||||
);
|
||||
$this->assertDef(
|
||||
'hsl(244, 47.4%, 88.1%) right center',
|
||||
'hsl(244,47.4%,88.1%) right center'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
Reference in New Issue
Block a user