-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Normal
-
None
-
Affects Version/s: None
-
Component/s: URL cleanup
Hi, Community,
Beatport URL Cleanup module in browser replaces this URL
https://www.beatport.com/release/20-years-best-of-marcus-meinhardt/2241434
into this
https://www.beatport.com/release/-/20
The problem lies in 5th and 6th regex.
beatport: {
match: [new RegExp("^(https?://)?([^/]+\\.)?beatport\\.com", "i")],
type: LINK_TYPES.downloadpurchase,
clean: function (url) {
url = url.replace(/^(?:https?:\/\/)?(?:(?:classic|pro|www)\.)?beatport\.com\//, "https://www.beatport.com/");
url = url.replace(/^(https:\/\/www\.beatport\.com)\/[\w-]+\/html\/content\/([\w-]+)\/0*([0-9]+)\/([\w-]+).*$/, "$1/$2/$4/$3");
url = url.replace(/^(https:\/\/www\.beatport\.com)\/[\w-]+\/html\/content\/([\w-]+)\/0*([0-9]+)(?:[\/?#].*)?$/, "$1/$2/-/$3");
url = url.replace(/^(https:\/\/www\.beatport\.com)\/([\w-]+)\/([\w-]+)\/0*([0-9]+).*$/, "$1/$2/$3/$4");
url = url.replace(/^(https:\/\/www\.beatport\.com)\/([\w-]+)\/\/+0*([0-9]+)(?:[\/?#].*)?$/, "$1/$2/-/$3");
url = url.replace(/^(https:\/\/www\.beatport\.com)\/([\w-]+)\/0*([0-9]+)(?:[\/?#].*)?$/, "$1/$2/$3");
return url;
}...
source of codepiece https://github.com/metabrainz/musicbrainz-server/blob/14028cc512c34a9bf9859c40f28b699a6dec8bc7/root/static/scripts/edit/URLCleanup.js#L603
I don't know for what reason these two was added so I am not sure of fixing that, but better if anyone can help.
- duplicates
-
MBS-9743 Beatport URL cleanup fails for names starting with digit
-
- Closed
-