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

Use IDNA2008 for converting domains to ASCII

This commit is contained in:
Marina Glancy
2017-10-03 18:44:24 +08:00
committed by Edward Z. Yang
parent 17f80cd74b
commit ce0ede24de
2 changed files with 2 additions and 1 deletions

View File

@@ -49,6 +49,7 @@ class HTMLPurifier_AttrDef_URI_HostTest extends HTMLPurifier_AttrDefHarness
}
$this->config->set('Core.EnableIDNA', true);
$this->assertDef("\xE4\xB8\xAD\xE6\x96\x87.com.cn", "xn--fiq228c.com.cn");
$this->assertDef("faß.de", "xn--fa-hia.de");
$this->assertDef("\xe2\x80\x85.com", false); // rejected
}