mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-04 05:07:55 +02:00
Make extractBody not terminate prematurely on first </body>.
Previously, if two </body> tags were present, HTML Purifier would truncate everything after the first </body>. This is not ideal behavior; so HTML Purifier has been changed to match up to the last </body>. Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
@@ -151,6 +151,10 @@ class HTMLPurifier_LexerTest extends HTMLPurifier_Harness
|
||||
$this->assertExtractBody('<body>asdf'); // not closed, don't accept
|
||||
}
|
||||
|
||||
function test_extractBody_useLastBody() {
|
||||
$this->assertExtractBody('<body>foo</body>bar</body>', 'foo</body>bar');
|
||||
}
|
||||
|
||||
// HTMLPurifier_Lexer->tokenizeHTML() --------------------------------------
|
||||
|
||||
function assertTokenization($input, $expect, $alt_expect = array()) {
|
||||
|
Reference in New Issue
Block a user