mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-01 11:50:28 +02:00
feat: Allow more image widths by default (#430)
This commit is contained in:
@@ -11,6 +11,7 @@ class HTMLPurifier_HTMLModule_ImageTest extends HTMLPurifier_HTMLModuleHarness
|
||||
|
||||
public function testLengthTooLarge()
|
||||
{
|
||||
$this->config->set('HTML.MaxImgLength', 1200);
|
||||
$this->assertResult(
|
||||
'<img height="40000" width="40000" src="" alt="" />',
|
||||
'<img height="1200" width="1200" src="" alt="" />'
|
||||
@@ -19,6 +20,7 @@ class HTMLPurifier_HTMLModule_ImageTest extends HTMLPurifier_HTMLModuleHarness
|
||||
|
||||
public function testLengthPercentage()
|
||||
{
|
||||
$this->config->set('HTML.MaxImgLength', 1200);
|
||||
$this->assertResult(
|
||||
'<img height="100%" width="100%" src="" alt="" />',
|
||||
'<img src="" alt="" />'
|
||||
|
@@ -6,6 +6,7 @@ class HTMLPurifier_HTMLModule_SafeEmbedTest extends HTMLPurifier_HTMLModuleHarne
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->config->set('HTML.MaxImgLength', 1200);
|
||||
$def = $this->config->getHTMLDefinition(true);
|
||||
$def->manager->addModule('SafeEmbed');
|
||||
}
|
||||
|
@@ -8,6 +8,7 @@ class HTMLPurifier_HTMLModule_SafeObjectTest extends HTMLPurifier_HTMLModuleHarn
|
||||
parent::setUp();
|
||||
$this->config->set('HTML.DefinitionID', 'HTMLPurifier_HTMLModule_SafeObjectTest');
|
||||
$this->config->set('HTML.SafeObject', true);
|
||||
$this->config->set('HTML.MaxImgLength', 1200);
|
||||
}
|
||||
|
||||
public function testMinimal()
|
||||
|
Reference in New Issue
Block a user