From e37c43ea06deabe86bd0ec572a89e5159b4b6997 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 23 Sep 2019 09:11:05 +0000 Subject: composer update ezyang/htmlpurifier (cherry picked from commit a34ce790129bdd729a5019895ea6cd4c59f08ba4) --- .../ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI') diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php index e54a3344a..1beeaa5d2 100644 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php +++ b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php @@ -97,7 +97,11 @@ class HTMLPurifier_AttrDef_URI_Host extends HTMLPurifier_AttrDef // PHP 5.3 and later support this functionality natively if (function_exists('idn_to_ascii')) { - $string = idn_to_ascii($string, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46); + if (defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46')) { + $string = idn_to_ascii($string, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46); + } else { + $string = idn_to_ascii($string); + } // If we have Net_IDNA2 support, we can support IRIs by // punycoding them. (This is the most portable thing to do, -- cgit v1.2.3