php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51780 FILTER_VALIDATE_URL should allow domain name with '-'
Submitted: 2010-05-10 05:03 UTC Modified: 2010-05-10 05:38 UTC
From: srwang at pixnet dot tw Assigned:
Status: Duplicate Package: Filter related
PHP Version: 5.3.2 OS: All
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: srwang at pixnet dot tw
New email:
PHP Version: OS:

 

 [2010-05-10 05:03 UTC] srwang at pixnet dot tw
Description:
------------
FILTER_VALIDATE_URL should allow host name with '-'

Test script:
---------------
var_dump(filter_var('http://www.711.com.tw', FILTER_VALIDATE_URL));
var_dump(filter_var('http://www.7-11.com.tw', FILTER_VALIDATE_URL));

Expected result:
----------------
string(21) "http://www.711.com.tw"
string(22) "http://www.7-11.com.tw"


Actual result:
--------------
string(21) "http://www.711.com.tw"
bool(false)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-10 05:39 UTC] rasmus@php.net
-Status: Open +Status: Duplicate
 [2010-05-10 05:39 UTC] rasmus@php.net
This was reported and fixed before.  Will be in the next release.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 17:01:29 2024 UTC