mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-30 19:00:10 +02:00
Core.EscapeNonASCIICharacters now always works, even if target is UTF-8.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
@@ -123,7 +123,15 @@ class HTMLPurifier_EncoderTest extends HTMLPurifier_Harness
|
||||
HTMLPurifier_Encoder::convertFromUTF8($this->getZhongWen(), $this->config, $this->context),
|
||||
"中文 (Chinese)"
|
||||
);
|
||||
}
|
||||
|
||||
function test_convertFromUTF8_withProtectionButUtf8() {
|
||||
// Preserve the characters!
|
||||
$this->config->set('Core.EscapeNonASCIICharacters', true);
|
||||
$this->assertIdentical(
|
||||
HTMLPurifier_Encoder::convertFromUTF8($this->getZhongWen(), $this->config, $this->context),
|
||||
"中文 (Chinese)"
|
||||
);
|
||||
}
|
||||
|
||||
function test_convertToASCIIDumbLossless() {
|
||||
|
Reference in New Issue
Block a user