mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 14:16:32 +02:00
feat: Allow more image widths by default (#430)
This commit is contained in:
@@ -211,6 +211,7 @@ class HTMLPurifier_Strategy_ValidateAttributesTest extends
|
||||
|
||||
public function testRemoveLargeCSSWidthAndHeightOnImg()
|
||||
{
|
||||
$this->config->set('CSS.MaxImgLength', '1200px');
|
||||
$this->assertResult(
|
||||
'<img src="" alt="" style="width:10000000px;height:10000000px;border:1px solid #000;" />',
|
||||
'<img src="" alt="" style="border:1px solid #000;" />'
|
||||
@@ -244,6 +245,7 @@ class HTMLPurifier_Strategy_ValidateAttributesTest extends
|
||||
|
||||
public function testRemoveRelativeCSSWidthAndHeightOnImg()
|
||||
{
|
||||
$this->config->set('CSS.MaxImgLength', '1200px');
|
||||
$this->assertResult(
|
||||
'<img src="" alt="" style="width:10em;height:10em;border:1px solid #000;" />',
|
||||
'<img src="" alt="" style="border:1px solid #000;" />'
|
||||
@@ -252,6 +254,7 @@ class HTMLPurifier_Strategy_ValidateAttributesTest extends
|
||||
|
||||
public function testRemovePercentCSSWidthAndHeightOnImg()
|
||||
{
|
||||
$this->config->set('CSS.MaxImgLength', '1200px');
|
||||
$this->assertResult(
|
||||
'<img src="" alt="" style="width:100%;height:100%;border:1px solid #000;" />',
|
||||
'<img src="" alt="" style="border:1px solid #000;" />'
|
||||
|
Reference in New Issue
Block a user