mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-03 13:21:51 +00:00
css properties: min-width, max-width, min-height, max-height
This commit is contained in:
parent
1ce2fde400
commit
246fc8946a
@ -15,6 +15,9 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.2"
|
"php": ">=5.2"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"simpletest/simpletest": "^1.1"
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": { "HTMLPurifier": "library/" },
|
"psr-0": { "HTMLPurifier": "library/" },
|
||||||
"files": ["library/HTMLPurifier.composer.php"]
|
"files": ["library/HTMLPurifier.composer.php"]
|
||||||
|
@ -225,6 +225,10 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition
|
|||||||
);
|
);
|
||||||
$max = $config->get('CSS.MaxImgLength');
|
$max = $config->get('CSS.MaxImgLength');
|
||||||
|
|
||||||
|
$this->info['min-width'] =
|
||||||
|
$this->info['max-width'] =
|
||||||
|
$this->info['min-height'] =
|
||||||
|
$this->info['max-height'] =
|
||||||
$this->info['width'] =
|
$this->info['width'] =
|
||||||
$this->info['height'] =
|
$this->info['height'] =
|
||||||
$max === null ?
|
$max === null ?
|
||||||
|
@ -61,6 +61,10 @@ class HTMLPurifier_AttrDef_CSSTest extends HTMLPurifier_AttrDefHarness
|
|||||||
$this->assertDef('width:50px;');
|
$this->assertDef('width:50px;');
|
||||||
$this->assertDef('width:auto;');
|
$this->assertDef('width:auto;');
|
||||||
$this->assertDef('width:-50px;', false);
|
$this->assertDef('width:-50px;', false);
|
||||||
|
$this->assertDef('min-width:50%;');
|
||||||
|
$this->assertDef('min-width:50px;');
|
||||||
|
$this->assertDef('min-width:auto;');
|
||||||
|
$this->assertDef('min-width:-50px;', false);
|
||||||
$this->assertDef('text-decoration:underline;');
|
$this->assertDef('text-decoration:underline;');
|
||||||
$this->assertDef('font-family:sans-serif;');
|
$this->assertDef('font-family:sans-serif;');
|
||||||
$this->assertDef("font-family:Gill, 'Times New Roman', sans-serif;");
|
$this->assertDef("font-family:Gill, 'Times New Roman', sans-serif;");
|
||||||
|
Loading…
Reference in New Issue
Block a user