Skip to content

Conversation

@reosarevok
Copy link
Member

@reosarevok reosarevok commented Jan 9, 2026

Fix MBS-14231

Problem

Our tag UI on the website does not support tags with commas, and our tags are documented to be comma-separated. At the same time, nothing in the API is blocking submitting tags with commas in POST submissions, which later get "stuck" since they cannot be voted on nor withdrawn on the website itself.

Solution

This implements what seems to be the obvious solution: rejecting the submission of tags with commas entirely also via the API.
I left an exception for "withdraw" votes, since removing tags with commas seems entirely safe and makes it a bit easier to clean any existing tags (there seem to be only 52 tags with commas at the moment though, see this gist).

Testing

Manually with my local server, plus added some basic tests here.

Our tag UI on the website does not support tags with commas,
and our tags are documented to be comma-separated.
At the same time, nothing in the API is blocking submitting
tags with commas in POST submissions, which later
get "stuck" since they cannot be voted on nor withdrawn
on the website itself.

This implements what seems to be the obvious solution:
rejecting the submission of tags with commas entirely also via
the API.
I left an exception for "withdraw" votes, since removing
tags with commas seems entirely safe and makes it a bit
easier to clean any existing tags (there seem to be only 52
tags with commas at the moment though).
@reosarevok reosarevok added Bug Bugs that should be checked/fixed soonish API labels Jan 9, 2026
@reosarevok
Copy link
Member Author

I would suggest MBS-8697 can be closed if we have removed all the existing ways of submitting tags with commas (which hopefully this is the last of). What do you think?

Copy link
Member

@mwiencek mwiencek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tests. 🙂

@reosarevok reosarevok merged commit 5730b74 into metabrainz:master Jan 12, 2026
7 checks passed
@mwiencek
Copy link
Member

I would suggest MBS-8697 can be closed if we have removed all the existing ways of submitting tags with commas (which hopefully this is the last of). What do you think?

I'd agree for now unless someone can document an important use-case for tags with commas. I do like the idea of them being completely free-form, but they should at least be disallowed while they break our UI.

@reosarevok reosarevok deleted the MBS-14231 branch January 12, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Bug Bugs that should be checked/fixed soonish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants