Skip to content

Conversation

@janbarasek
Copy link
Contributor

@janbarasek janbarasek commented Dec 25, 2020

  • bug fix
  • BC break? yes

By documentation (more info: https://www.php.net/manual/en/function.idn-to-utf8.php) the domain xn--tst-qla.de is same as täst.de, but Nette Url claims that it is a different URLs:

$url = new Url('https://täst.de:443/cart');
$url2 = new Url('https://xn--tst-qla.de/cart');

$url->isEqual($url2); // false

This modification adds automatic conversion of IDN domains to UTF-8 format (if an extension is available). Prior to conversion, the use of IDNs is detected to maintain maximum performance.

If a particular PHP does not have an extension, it can be replaced by the symfony/polyfill-intl-idn package.

Thanks.

@dg dg force-pushed the master branch 6 times, most recently from bda06a4 to e791a00 Compare January 4, 2021 15:04
@dg
Copy link
Member

dg commented Jan 5, 2021

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants