mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 14:16:32 +02:00
[3.0.0] [BACKPORT] More work for hire from Chris
! Experimental support for some proprietary CSS attributes allowed: opacity (and all of the browser-specific equivalents) and scrollbar colors. Enable by setting %CSS.Proprietary to true. - Colors missing # but in hex form will be corrected - CSS Number algorithm improved . New classes: + HTMLPurifier_AttrDef_CSS_AlphaValue + HTMLPurifier_AttrDef_CSS_Filter git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1473 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -112,5 +112,23 @@ class HTMLPurifier_AttrDef_CSSTest extends HTMLPurifier_AttrDefHarness
|
||||
|
||||
}
|
||||
|
||||
function testProprietary() {
|
||||
$this->config->set('CSS', 'Proprietary', true);
|
||||
$this->def = new HTMLPurifier_AttrDef_CSS();
|
||||
|
||||
$this->assertDef('scrollbar-arrow-color:#ff0;');
|
||||
$this->assertDef('scrollbar-base-color:#ff6347;');
|
||||
$this->assertDef('scrollbar-darkshadow-color:#ffa500;');
|
||||
$this->assertDef('scrollbar-face-color:#008080;');
|
||||
$this->assertDef('scrollbar-highlight-color:#ff69b4;');
|
||||
$this->assertDef('scrollbar-shadow-color:#f0f;');
|
||||
|
||||
$this->assertDef('opacity:.2;');
|
||||
$this->assertDef('-moz-opacity:.2;');
|
||||
$this->assertDef('-khtml-opacity:.2;');
|
||||
$this->assertDef('filter:alpha(opacity=20);');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user