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

Use idn_to_ascii when available.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
This commit is contained in:
Edward Z. Yang
2016-03-02 01:35:07 -08:00
parent 913ac6955b
commit aebe1c02a2
2 changed files with 6 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ class HTMLPurifier_AttrDef_URI_HostTest extends HTMLPurifier_AttrDefHarness
public function testIDNA()
{
if (!$GLOBALS['HTMLPurifierTest']['Net_IDNA2']) {
if (!$GLOBALS['HTMLPurifierTest']['Net_IDNA2'] && !function_exists("idn_to_ascii")) {
return false;
}
$this->config->set('Core.EnableIDNA', true);