Issue Details (XML | Word | Printable)

Key: MBS-3405
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Oliver Charles
Reporter: Nicolás Tamargo
Votes: 6
Watchers: 2

If you were logged in you would be able to see more operations.
MusicBrainz Server

Remove leading / trailing / double spaces in titles

Created: 08/Sep/11 09:28 AM   Updated: 29/Aug/12 04:04 PM   Resolved: 29/Aug/12 04:04 PM
Component/s: Edit system, Release editor
Affects Version/s: None
Fix Version/s: Bug fixes, 2012-08-20

 Description  « Hide

This was fixed in Mason but it's back [1] (also, it seems MBS-152 has been unfixed). Just make it so they're automatically removed / turned into a single space in new edits, and a bot can fix the ones we have already.


Sort Order: Ascending order - Click to sort in descending order
Luca Salini added a comment - 11/Oct/11 12:52 PM

It doesn't look like this was really fixed. I still see titles with trailing spaces being added, e.g. the one I fixed with .

voiceinsideyou added a comment - 11/Oct/11 01:37 PM

Yeah, confirmed for auto-created release groups, release titles and track titles on release editor.

Oliver Charles added a comment - 12/Oct/11 01:19 PM

Ok, these issues are only caused by the release editor, and that's because it uses the form system in a slightly different way. At the moment, the release editor uses exactly what you typed, and inserts that. The other forms use a cleaned value of what you've typed, but the release editor doesn't seem to use these cleaned values. So there are 2 options:

1. Fix the release editor to use the cleaned values, not the users direct input.
2. At the point of insertion do the cleaning up.

I don't like 2, because it's only half way to what it's really trying to express, which is that names must never start or end with a space, and never have multiple spaces. If this is truly what we want, then this should be handled at the database level (triggers, checks, and what not).

So I'm making this decision required to see how far we want to clean this data up. I like the long term solution of 2 (pushing stuff) to the DB, because I trust database code more than I trust the Perl code, but it does mean a minor semantic change as to practical data type of and friends.

Robert Kaye added a comment - 14/Oct/11 01:45 PM

I think this should be fixed in the release editor. Option 2 has interesting semantic implications that we may not want.

Calvin Walton added a comment - 25/Nov/11 12:23 AM

As a note, this bug also allows the creation of such things as release groups with no visible name:
(The release group name is actually just a single space in that edit, done accidentally.)

Oliver Charles added a comment - 12/Jan/12 10:43 PM

As this issue has been delayed, I am moving it back to be rescheduled.

Oliver Charles added a comment - 29/Aug/12 04:04 PM - edited

This was fixed with MBS-5071/MBS-5078/MBS-152