ezyang / htmlpurifier

Standards compliant HTML filter written in PHP
http://htmlpurifier.org
GNU Lesser General Public License v2.1
3.07k stars 327 forks source link

`IDNA_NONTRANSITIONAL_TO_ASCII` is not available when using the IDN extension #168

Closed dtdesign closed 6 years ago

dtdesign commented 6 years ago

Some hosts seem to use a IDN PHP-extension that exposes functions like idn_to_ascii(), but lack the constant IDNA_NONTRANSITIONAL_TO_ASCII, possibly others too. This causes the change in ce0ede2 to fail on these hosts, because there is no check for the existence of the constant itself.

I've found some similar issues in other projects that suggest that this is more wide-spread than one would assume. From what I know at least one larger German hosting company is affected by this.

You can search by the name of the constant to dig up more cases of this.

benjaminkohl commented 6 years ago

I am currently being affected by this issue and I see there is a defined() check in place on master now but it hasn't made its way into a release yet. Is that correct? Our project's lock file shows this package at v4.10.0.