|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69501 filter_var url validation does not support hebrew urls
Submitted: 2015-04-22 05:24 UTC Modified: 2015-04-22 12:10 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: bitanetanel at gmail dot com Assigned:
Status: Open Package: Filter related
PHP Version: 5.5.24 OS: linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-04-22 05:24 UTC] bitanetanel at gmail dot com
From manual page:

filter_var url validation does not support hebrew urls
For example, this is a valid url:בדיקה
But the filter_var function returns false.

Test script:
$url = "אבג";
if(!filter_var($url, FILTER_VALIDATE_URL))
  echo "Invalid URL";
  echo "Valid URL";

will output "Invalid url", but it is a valid url..


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-22 12:10 UTC]
-Type: Bug +Type: Feature/Change Request -Package: *General Issues +Package: Filter related
 [2015-04-22 12:10 UTC]
That is documented behavior[1]. In short: FILTER_VALIDATE_URL
validates according to RFC 2396, which does not cater to IDNs.

I'm changing to feature request.

[1] <>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 09:01:28 2024 UTC