If there an easy way to stop links like www.myøwn.no being rejected by the valid_url function without encoding them? Surely now we have unicode domains and even TLDs in utf8 it's about time we started accepting urls in utf8?
If there an easy way to stop links like www.myøwn.no being rejected by the valid_url function without encoding them? Surely now we have unicode domains and even TLDs in utf8 it's about time we started accepting urls in utf8?
Comments
Comment #1
Dave ReidWe encountered this recently with
http://edukame.com/wp-content/uploads/2009/02/madre-y-niña-besa-mano.jpg
on #1492658: Support URLs with UTF8 characters in media_internet. This is a core bug that needs to be backported as well.Comment #2
Dave ReidSeems that we can't even rely on filter_var($url, FILTER_VALIDATE_URL) in PHP since that also fails as well.
Comment #3
HazaWe can still use filter_var with FILTER_CALLBACK to write our own filter function.
Comment #4
dawehnerThere is a pecl for that http://php.net/manual/en/function.idn-to-ascii.php which you can run before running filter_var, though this can't be used here.
The standard which has to be implemented is http://www.ietf.org/rfc/rfc3490.txt
Comment #5
sunThanks for taking the time to report this issue.
However, marking as duplicate of #389278: Create IDN encoding and decoding functions. You may follow that issue to track its status instead. If any information from this issue is missing in the other issue, please make sure you provide it over there.
Comment #6
MixologicComment #7
Gábor Hojtsy