The FILTER_VALIDATE_URL
filter seems to have some trouble validating non-ASCII URLs:
var_dump(filter_var('http://pt.wikipedia.org/wiki/', FILTER_VALIDATE_URL)); // http://pt.wikipedia.org/wiki/
var_dump(filter_var('http://pt.wikipedia.org/wiki/Guimarães', FILTER_VALIDATE_URL)); // false
Why isn't the last URL correctly validated? And what are the possible workarounds? Running PHP 5.3.0.
I'd also like to know where I can find the source code of the FILTER_VALIDATE_URL
validation filter.