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 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.
We’ve merged a fix that cleans the localized tag names after it is returned from the LLM, and also a post migration that cleans the existing “dirty” localized tag names.
Also note, the PR indicates that the post migration does have some application logic for cleaning tags, but we should be safe here with certain conditions and tests.
I’ll keep this topic open to see how it turns out for you.