Issue Details (XML | Word | Printable)

Key: MBS-4810
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Johannes Weißl
Reporter: Johannes Weißl
Votes: 0
Watchers: 1
Operations

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

CC license URLs are not fully normalized in URLCleanup.js

Created: 30/May/12 07:31 PM   Updated: 13/Jun/12 09:30 AM   Resolved: 13/Jun/12 09:30 AM
Component/s: None
Affects Version/s: None
Fix Version/s: Bug fixes, 2012-06-25

Issue Links:
Relates
 


 Description  « Hide

The slash at the end of CC licenses is not added, see e.g. edit #17810977.



Sort Order: Ascending order - Click to sort in descending order
Johannes Weißl added a comment - 31/May/12 07:26 AM - edited

This is not as easily solvable as I thought, because adding a slash at the end is only possible if we know when a license is at the end. So this would be either a very long regexp, or we need a list of all (valid) CC licenses.

E.g. a naive approach would be:

url = url.replace(/^(http:\/\/creativecommons\.org\/licenses\/.*[^\/])/, "$1/");

but it would add a slash immediately after "http://creativecommons.org/licenses/b".

For the solution of MBS-3956 (protect license URLs) we probably need a list of "protected" URLs anyway, so maybe we can introduce it somehow (maybe in the code, maybe in the database)?


Johannes Weißl added a comment - 12/Jun/12 09:35 PM