FILTER_VALIDATE_URL returns false when latin chars (šđčćž) present in URL
Open
Nobody has claimed this yet.
Extension: filter
Feature
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
It's been a few years since latin chars are supported in domain names, and urls.
Description
The following code:
<?php var_dump(filter_var('info@ćufta.com', FILTER_VALIDATE_EMAIL));?>
Resulted in this output:
FALSE
But I expected this output instead:
TRUE
PHP Version
PHP 8.3.17
Operating System
Ubuntu Mint - Linux 5.4.0-208-generic #228-Ubuntu SMP Fri Feb 7 19:41:33 UTC 2025 x86_64
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the supplied filter_var example with FILTER_VALIDATE_EMAIL and compare it with the issue title, which refers to FILTER_VALIDATE_URL. Trace the relevant PHP filter validation entry point and existing tests for internationalized email or URL characters. Done means the intended validation behavior is agreed and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100