chore: url fixes
This commit is contained in:
parent
ba389dab59
commit
c6f9ec7ced
4 changed files with 20 additions and 10 deletions
|
@ -5,7 +5,12 @@ export const artistCapitalization = (artist) => artistCapitalizationPatches[arti
|
|||
|
||||
export const sanitizeMediaString = (string) => {
|
||||
const normalizedStr = string.normalize('NFD');
|
||||
return normalizedStr.replace(/[\u0300-\u036f]/g, '').replace(/\.{3}/g, '');
|
||||
};
|
||||
return normalizedStr
|
||||
.replace(/[\u0300-\u036f]/g, '')
|
||||
.replace(/[\u2010]/g, '-')
|
||||
.replace(/\.{3}/g, '')
|
||||
.replace(/\?/g, '')
|
||||
.replace(/[\(\)\[\]\{\}]/g, '')
|
||||
}
|
||||
|
||||
export const mbidMap = (artist) => mbidPatches[artist.toLowerCase()] || ''
|
Reference in a new issue