Skip to content

[Validator] UrlValidator does not accept path with some unicode #54937

Closed
@norkunas

Description

@norkunas

Symfony version(s) affected

>= 5.4.*

Description

I've automated import resources from an api which returned an url http://www.fivestarproduction.co.th/คนแซ่ลี้/ and the validation fails with it.

Works only when the path for this URL is urlencoded.

But if the link is working directly, it should be accepted by validator, no?

Copied random japanase symbol from alphabet and for example this url works: http://www.example.com/か/

How to reproduce

preg_match(sprintf(UrlValidator::PATTERN, 'http|https'), 'http://www.fivestarproduction.co.th/คนแซ่ลี้/') === 0

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions