1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 03:10:09 +02:00

Rename newline normalization directive to something better.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
Edward Z. Yang
2010-09-15 02:49:24 -04:00
parent 9573f0933d
commit 86990a21f1
8 changed files with 34 additions and 25 deletions

View File

@@ -726,18 +726,18 @@ div {}
}
function test_tokenizeHTML_removeNewline() {
$this->config->set('HTML.NewlineNormalization', true);
$input = "plain text\r\n";
$this->config->set('Core.NormalizeNewlines', true);
$input = "plain\rtext\r\n";
$expect = array(
new HTMLPurifier_Token_Text("plain text\n")
new HTMLPurifier_Token_Text("plain\ntext\n")
);
}
function test_tokenizeHTML_noRemoveNewline() {
$this->config->set('HTML.NewlineNormalization', false);
$input = "plain text\r\n";
$this->config->set('Core.NormalizeNewlines', false);
$input = "plain\rtext\r\n";
$expect = array(
new HTMLPurifier_Token_Text("plain text\r\n")
new HTMLPurifier_Token_Text("plain\rtext\r\n")
);
$this->assertTokenization($input, $expect);
}