php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52334 not allowing urls with hyphens in the domain
Submitted: 2010-07-14 09:15 UTC Modified: 2010-07-14 09:22 UTC
From: code at margni dot com Assigned:
Status: Duplicate Package: Filter related
PHP Version: 5.3.2 OS: *NIX
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: code at margni dot com
New email:
PHP Version: OS:

 

 [2010-07-14 09:15 UTC] code at margni dot com
Description:
------------
hyphen (-) is a valid character in a domain name

Test script:
---------------
var_dump(filter_var('http://www.foo-bar.com', FILTER_VALIDATE_URL));

Expected result:
----------------
'http://www.foo-bar.com'

Actual result:
--------------
FALSE

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-14 09:18 UTC] rasmus@php.net
-Status: Open +Status: Duplicate
 [2010-07-14 09:18 UTC] rasmus@php.net
Already reported and fixed in 5.3.3
 [2010-07-14 09:19 UTC] code at margni dot com
-: stephen@margni.com +: code at margni dot com
 [2010-07-14 09:19 UTC] code at margni dot com
fixed my email
 [2010-07-14 09:20 UTC] code at margni dot com
-Status: Duplicate +Status: Closed
 [2010-07-14 09:20 UTC] code at margni dot com
great!
 [2010-07-14 09:22 UTC] pajoye@php.net
-Status: Closed +Status: Duplicate
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC