slugify icon indicating copy to clipboard operation
slugify copied to clipboard

Dirty string with ampersands

Open Qrzysio opened this issue 5 years ago • 1 comments

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 ;?

Qrzysio avatar Feb 26 '19 11:02 Qrzysio

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?

florianeckerstorfer avatar Feb 26 '19 18:02 florianeckerstorfer