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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fumble1 at web dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sat Dec 21 11:01:30 2024 UTC