Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird behavior of Str::slug in particular language #54444

Open
kenan-recebli opened this issue Feb 2, 2025 · 0 comments · May be fixed by #54446
Open

Weird behavior of Str::slug in particular language #54444

kenan-recebli opened this issue Feb 2, 2025 · 0 comments · May be fixed by #54446

Comments

@kenan-recebli
Copy link

kenan-recebli commented Feb 2, 2025

Laravel Version

11.41.3

PHP Version

8.3.16

Database Driver & Version

No response

Description

I think it's better just to show:

Image

First, I couldn't realize why slug becomes longer, then noticed extra letters. Then tried to manually delete letters to find out letter combinations that cause this issue.

Maybe it happens in other languages too, but I tested some languages, they all return nad.

Maybe there is are other combinations also, that behaves weird, but I didn't test.

First, I thought that it's because of the ascii method, but no. I couldn't find the source of this issue.

UPDATE
Find out a little bit more combinations (in the second example letter is trimmed):

Image

Steps To Reproduce

Just do:
str('nad')->slug('az')
str('yab')->slug('az')
str('ab')->slug('az')

@faissaloux faissaloux linked a pull request Feb 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant