Issue Details (XML | Word | Printable)

Key: MBS-4824
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Nicolás Tamargo
Reporter: Ian McEwen
Votes: 0
Watchers: 0
Operations

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

URLCleanup.js only strips whitespace from the front of strings

Created: 02/Jun/12 08:19 PM   Updated: 08/Jun/12 03:05 PM   Resolved: 08/Jun/12 03:05 PM
Component/s: None
Affects Version/s: None
Fix Version/s: Bug fixes, 2012-06-11


 Description  « Hide

And I quote:

self.cleanUrl = function (sourceType, dirtyURL) {
dirtyURL = dirtyURL.replace(/^\s+/, '');

for (var group in MB.constants.CLEANUPS) {
if(!MB.constants.CLEANUPS.hasOwnProperty(group)) { continue; }

var cleanup = MB.constants.CLEANUPS[group];
if(!cleanup.hasOwnProperty('clean') || !cleanup.match.test(dirtyURL))
continue;

return cleanup.clean(dirtyURL);
}
return dirtyURL;
};

Presumably needs a line:

dirtyURL = dirtyURL.replace(/\s+$/, '');

or some way of combining that into the existing line



Sort Order: Ascending order - Click to sort in descending order
Nicolás Tamargo made changes - 02/Jun/12 08:21 PM
Field Original Value New Value
Assignee Nicolás Tamargo [ reosarevok ]
Nicolás Tamargo made changes - 02/Jun/12 09:19 PM
Status Open [ 1 ] Review Submitted [ 5 ]
Oliver Charles made changes - 08/Jun/12 03:05 PM
Status Review Submitted [ 5 ] Closed [ 6 ]
Fix Version/s Bug fixes, 2012-06-11 [ 10137 ]
Resolution Fixed [ 1 ]