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

Dirty string with ampersands #226

Open
Qrzysio opened this issue Feb 26, 2019 · 1 comment
Open

Dirty string with ampersands #226

Qrzysio opened this issue Feb 26, 2019 · 1 comment

Comments

@Qrzysio
Copy link

Qrzysio commented Feb 26, 2019

How about a bit more dirty string with ampersands after htmlspecialchars()?

$str = '*** ____ "Hello world" Anything ___ *** - something';

The above gives us quot-hello-world-quot-anything-something. Shouldn't the slugify cut everything between & and ;?

@florianeckerstorfer
Copy link
Member

No, it should not. The purpose of this library is to replace special characters with -, not clean up strings. Why are you running htmlspecialchars() before passing the string to slugify?

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

No branches or pull requests

2 participants