-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Using the String component (love it btw) v5.0.1 and the AsciiSlugger class to slugify a string, I noticed that apostrophes are not removed but they are replaced with the default dash separator.
Example:
(new AsciiSlugger())->slug("I'll see")
result is I-ll-see instead of ill-see
I temporarily fixed adding a replace in my custom slugify method that extend the UnicodeString class:
public function slugify(): self
{
$str = clone $this->folded()->replace('\'', '');
$str->string = (string) (new AsciiSlugger())->slug($str->string);
return $str;
}
Will it be possible to replace apostrophes by default in future release? Thanks :)
adamaveray