php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42353 FILTER_VALIDATE_URL rejects umlaut-domains
Submitted: 2007-08-20 19:22 UTC Modified: 2007-08-20 20:15 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: fumble1 at web dot de Assigned:
Status: Not a bug Package: Filter related
PHP Version: 5.2.3 OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 + 3 = ?
Subscribe to this entry?

 
 [2007-08-20 19:22 UTC] fumble1 at web dot de
Description:
------------
The regexp used for validating URLs rejects umlaut domains -- umlaut domains are legal nowadays, so filter should support them... since IE6 does NOT support them, I'd suggest adding a new flag, like FILTER_FLAG_ALLOW_UMLAUTS.

Reproduce code:
---------------
<?php
// Dom?ne: German for domain
// dom?ne.de actually exists
$url = 'http://www.dom?ne.de/';
var_dump(filter_var($url, FILTER_VALIDATE_URL));
?>

Expected result:
----------------
string(21) "http://www.dom?ne.de/"

Actual result:
--------------
bool(false)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-20 20:15 UTC] derick@php.net
No, they are not legal domain names. They become legal if you employ punycode-decode on them. See http://en.wikipedia.org/wiki/Punycode, http://tools.ietf.org/html/rfc1034 and http://tools.ietf.org/html/rfc3492
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC