Encoding names for URL construction, fixes #770
This commit is contained in:
@ -112,7 +112,7 @@ const GridItem = ({
|
||||
to = `/${item.type}/${encodeUri(item.uri)}`;
|
||||
if (item.name && item.type !== 'artist') {
|
||||
// Strip out "%"; this causes conflicts with our uri decoder
|
||||
to += `/${item.name.replace('%','')}`;
|
||||
to += `/${encodeURIComponent(item.name.replace('%', ''))}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -139,7 +139,7 @@ const ListItem = ({
|
||||
to = item.link;
|
||||
} else {
|
||||
to = `/${item.type}/${encodeUri(item.uri)}`;
|
||||
if (item.name && item.type !== 'artist') to += `/${item.name}`;
|
||||
if (item.name && item.type !== 'artist') to += `/${encodeURIComponent(item.name)}`;
|
||||
}
|
||||
|
||||
if (e.target.tagName.toLowerCase() !== 'a') {
|
||||
|
||||
Reference in New Issue
Block a user