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
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: 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: Sat Dec 21 15:01:29 2024 UTC