simov / slugify

Slugifies a string
MIT License
1.47k stars 126 forks source link

Symbol ® is not removed in strict mode #143

Open rendomnet opened 2 years ago

rendomnet commented 2 years ago

Symbol ® is not removed in strict mode. It is converted to r

Trott commented 2 years ago

I'm not sure that's a bug. The README says that strict mode means "strip special characters except replacement".

® is replaced by (r). Removing the special characters from the replacement results in r. I'm not sure that's a bug, but I guess I'm also not sure it isn't a bug. ¯\(ツ)

For what it's worth, the slug module would give you the behavior you want by default because it makes no attempt to handle special characters like ®.

> slugify('a®b')
'a(r)b'
> slugify('a®b', {strict: true})
'arb'
> slug('a@b')
'ab'
>
telou1 commented 1 year ago

hi did you find the solution? ethel