mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-12 10:16:18 +02:00
Fix bug involving whitespace-only nodes. Thanks Eric Wald for reporting.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@ -20,5 +20,12 @@ class HTMLPurifier_ChildDef_OptionalTest extends HTMLPurifier_ChildDefHarness
|
||||
$this->assertResult('');
|
||||
}
|
||||
|
||||
function testWhitespace() {
|
||||
$this->assertResult(' ');
|
||||
}
|
||||
|
||||
function testMultipleWhitespace() {
|
||||
$this->assertResult(' ');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
3
tests/HTMLPurifier/HTMLT/whitespace-preserve.htmlt
Normal file
3
tests/HTMLPurifier/HTMLT/whitespace-preserve.htmlt
Normal file
@ -0,0 +1,3 @@
|
||||
--HTML--
|
||||
Foo<b> </b>bar
|
||||
|
Reference in New Issue
Block a user