1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

Make newline normalization optional.

This commit is contained in:
Tomasz Muras
2010-09-10 21:51:55 +01:00
committed by Edward Z. Yang
parent 632bf2bbd4
commit 9573f0933d
8 changed files with 42 additions and 8 deletions

View File

@@ -725,6 +725,24 @@ div {}
);
}
function test_tokenizeHTML_removeNewline() {
$this->config->set('HTML.NewlineNormalization', true);
$input = "plain text\r\n";
$expect = array(
new HTMLPurifier_Token_Text("plain text\n")
);
}
function test_tokenizeHTML_noRemoveNewline() {
$this->config->set('HTML.NewlineNormalization', false);
$input = "plain text\r\n";
$expect = array(
new HTMLPurifier_Token_Text("plain text\r\n")
);
$this->assertTokenization($input, $expect);
}
/*
function test_tokenizeHTML_() {