From: Alexander Ebert Date: Tue, 2 Jan 2018 14:29:55 +0000 (+0100) Subject: Manual backport of a future HTMLPurifier change for PHP 7.2 X-Git-Tag: 3.1.0_RC_1~16^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4be48096c68a4141db02c7faa252c37a9e039877;p=GitHub%2FWoltLab%2FWCF.git Manual backport of a future HTMLPurifier change for PHP 7.2 --- diff --git a/wcfsetup/install/files/lib/system/api/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php b/wcfsetup/install/files/lib/system/api/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php index 3b4d186743..a0d44006c1 100644 --- a/wcfsetup/install/files/lib/system/api/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php +++ b/wcfsetup/install/files/lib/system/api/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php @@ -97,7 +97,9 @@ 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); + // WoltLab modification: backport of a change in a to-be-released version for PHP 7.2 compatibility + // see https://github.com/ezyang/htmlpurifier/commit/ce0ede24ded2e05489f5bab50cc53426599532e4 + $string = idn_to_ascii($string, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46); // If we have Net_IDNA2 support, we can support IRIs by // punycoding them. (This is the most portable thing to do,