mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-03 05:11:52 +00:00
Implement limited CSS property background, can only do colors (though this is desired behavior).
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@332 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
4e08389427
commit
dd1b911183
3
NEWS
3
NEWS
@ -6,8 +6,9 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
||||
- Malformed UTF-8 and non-SGML character detection and cleaning implemented
|
||||
- API documentation completed
|
||||
- Shorthand CSS properties implemented: font, border
|
||||
- A limited version of CSS background implemented, only color is supported
|
||||
- Basic color keywords translated into hexadecimal values
|
||||
- Table CSS properties implementeds
|
||||
- Table CSS properties implemented
|
||||
|
||||
1.0.0beta, released 2006-08-16
|
||||
- First public release, most functionality implemented. Notable omissions are:
|
||||
|
8
TODO
8
TODO
@ -6,12 +6,10 @@ Ongoing
|
||||
- Plugins for major CMSes (very tricky issue)
|
||||
|
||||
1.0 release
|
||||
- Limited shorthand CSS attributes
|
||||
- background
|
||||
- list-style
|
||||
- Revise (HTML|CSS)Definition and Config relationship (groundwork for 2.0)
|
||||
- Limited list-style shorthand CSS support
|
||||
- Lossy alternate character encoding support (characters not in the encoding
|
||||
will get silently dropped).
|
||||
- Revise (HTML|CSS)Definition and Config relationship (groundwork for 2.0)
|
||||
|
||||
1.1 release
|
||||
- Directive documentation generation
|
||||
@ -25,6 +23,8 @@ Ongoing
|
||||
|
||||
1.3 release
|
||||
- Make URI validation routines tighter (especially mailto)
|
||||
- More extensive URI filtering schemes
|
||||
- Allow for background-image and list-style-image (see above)
|
||||
- Distinguish between different types of URIs, for instance, a mailto URI
|
||||
in IMG SRC is nonsensical
|
||||
|
||||
|
@ -75,6 +75,15 @@ class HTMLPurifier_CSSDefinition
|
||||
array('capitalize', 'uppercase', 'lowercase', 'none'), false);
|
||||
$this->info['color'] = new HTMLPurifier_AttrDef_Color();
|
||||
|
||||
// technically speaking, this one should get its own validator, but
|
||||
// since we don't support background images, it effectively is
|
||||
// equivalent to color. The only trouble is that if the author
|
||||
// specifies an image and a color, they'll both end up getting dropped,
|
||||
// even though we ought to implement it and just discard the image
|
||||
// info. This will be fixed in a later version (see TODO) when
|
||||
// better URI filtering is implemented.
|
||||
$this->info['background'] =
|
||||
|
||||
$border_color =
|
||||
$this->info['border-top-color'] =
|
||||
$this->info['border-bottom-color'] =
|
||||
|
@ -23,6 +23,7 @@ class HTMLPurifier_AttrDef_CSSTest extends HTMLPurifier_AttrDefHarness
|
||||
$this->assertDef('text-transform:capitalize;');
|
||||
$this->assertDef('background-color:rgb(0,0,255);');
|
||||
$this->assertDef('background-color:transparent;');
|
||||
$this->assertDef('background:#FF9;');
|
||||
$this->assertDef('color:#F00;');
|
||||
$this->assertDef('border-top-color:#F00;');
|
||||
$this->assertDef('border-color:#F00 #FF0;');
|
||||
|
Loading…
Reference in New Issue
Block a user