mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 03:10:09 +02:00
Make newline normalization optional.
This commit is contained in:
committed by
Edward Z. Yang
parent
632bf2bbd4
commit
9573f0933d
@@ -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_() {
|
||||
|
Reference in New Issue
Block a user