You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Normally a URI must be ASCII, however. However, often it's not and
// parse_url might corrupt these strings.
//
// For that reason we take any non-ascii characters from the uri and
// uriencode them first.
$uri = preg_replace_callback(
'/[^[:ascii:]]/u',
function ($matches) {
return rawurlencode($matches[0]);
},
$uri
);
Urlencoding is NOT appropriate for domain name / FQDN!
This is a valid concern. I would say that IRI domains are not supported at all at the moment. I never really dove into this enough to truly understand what's needed. The punycode representation will ofc work.
So the parser is really only for RFC3986 URIs.
I would guess you would want to automatically turn the international domains into punycode on parse, and not just retain it (just like the Javascript APIs).
Unfortunately I'm no longer really active on this project, so this feature would have to be contributed by someone else.
Something not mentioned in the official documentation:
https://sabre.io/uri/usage/
but only in the source code:
https://github.com/sabre-io/uri/blob/master/lib/functions.php
is this piece:
Urlencoding is NOT appropriate for domain name / FQDN!
For example, these IRIs:
should NOT be parsed to:
Instead they should be parsed to:
The text was updated successfully, but these errors were encountered: