diff --git a/ecrire/inc/distant.php b/ecrire/inc/distant.php index d78bd4a4470996eb30c9e8961061454715de7065..0eaba2996a410940485db52bd8b2baa0f22742d1 100644 --- a/ecrire/inc/distant.php +++ b/ecrire/inc/distant.php @@ -355,6 +355,8 @@ function url_to_ascii($url_idn) { $url_idn = explode($host, $url_idn, 2); $url_idn = implode($host_ascii, $url_idn); } + // et on urlencode les char utf si besoin dans le path + $url_idn = preg_replace_callback('/[^\x20-\x7f]/', function($match) { return urlencode($match[0]); }, $url_idn); } return $url_idn;