Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use idn_to_ascii function instead of idna_convert library #785

Merged
merged 1 commit into from
May 30, 2023

Commits on Mar 19, 2023

  1. Use idn_to_ascii function instead of idna_convert library

    The `idna_convert` library is outdated and there is now a native PHP function to convert IDNs to Punycode.
    It requires `intl` extension or a [polyfill](https://github.com/symfony/polyfill-intl-idn).
    
    `compress_parse_url` will append `?` and `#` to the URI even if there is no query string or hash fragment, and insert `//` even when there is no authority part. To avoid this and the breakage of tests this would cause, let’s call the function only for files having a non-empty authority part of the URI (i.e. non-local files) that contains characters that are not considered printable ASCII (such as bytes of UTF-8 encoded Unicode characters).
    
    In the future, we might leave the IDN support to HTTP library to deal with.
    jtojnar committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    185a727 View commit details
    Browse the repository at this point in the history