The dot «.» symbol is stripped from a category slug

AI-generated summary

The discussion revolves around the issue of the dot «.» symbol being stripped from a category slug. dmitry_fedyuk presents images showing the issue. eviltrout explains that periods are intentionally not included in URLs to prevent issues with Rails’ mime detection. Mittineague notes that the modal provides some guidance on slug format, but it may not be clear to all users. fantasticfears suggests that the slug is auto-generated and that a validation error is not shown, but the string is changed under the hood. They also propose adding client-side or server-side validation to handle slug generation for other languages.

This isn’t a bug. We don’t put periods in URLs as it can trip up Rail’s mime detection, or make it look like you’re downloading a file. For example virus.exe

4개의 좋아요

If you look at the modal, it reads

Category Slug

(Optional) dashed-words for url

Not a problem as long as someone knows what format slugs have.
Not a problem as long as someone knows what is and isn’t a word.

It seems seeing “dashed-words” would be clue enough.
And coders would understand [-a-z]+

But I can’t think of any way things could be made more clear so that everyone would understand what it does.

Slug is like a auto generated stuff under the hood (mainly for topic). It’s the only place where we can change a slug. This is also why it doesn’t show a validation error but changed the string under the hood.

Might be good for adding a validation in client side or server. It’s meant for other languages and often accompanied a slug_generation_method setting of encoded.