Localized tags are not slugified

If tags are localized, either

  • via the API
  • via AI translation
  • via the experimental tag settings page

The name is not slugified, leading to all kinds of issues when there is whitespace or quotes in them.
TBH I wonder if the body classes should contain the localized tags at all.

This also causes weird issues when the tags are displayed underneath the topic title.

@nat probably reaching here but could this have been fixed by:

This is not about the slug, it’s about the sluggified name (I hope you’re still with me)

A tag with name my-name and slug my-slug will live at /tag/my-slug/ID and it has a body class of tag-my-name.

Where the regular tag name field in the tag edit page will remove all special characters (my-name"(123) will save as my-name123), the name fields in the localizations do not, nor are they properly sluggified on output.

A tag with name my-name and a Dutch localization of mijn-naam will get the tag-mijn-naam body class.

A tag with name my-name and a Dutch localization of mijn-naam" (123) will get a tag-mijn-naam" (123) body class which breaks a lot of things.

Slug generation method is set to ascii btw.