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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or 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

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-2021 The PHP Group
All rights reserved.
Last updated: Mon Dec 06 07:03:36 2021 UTC