mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
75939: Encode and lowercase entity type url
This commit is contained in:
@@ -24,7 +24,7 @@ export function getItemEditRoute(item: Item) {
|
|||||||
|
|
||||||
export function getEntityPageRoute(entityType: string, itemId: string) {
|
export function getEntityPageRoute(entityType: string, itemId: string) {
|
||||||
if (isNotEmpty(entityType)) {
|
if (isNotEmpty(entityType)) {
|
||||||
return new URLCombiner('/entities', entityType, itemId).toString();
|
return new URLCombiner('/entities', encodeURIComponent(entityType.toLowerCase()), itemId).toString();
|
||||||
} else {
|
} else {
|
||||||
return new URLCombiner(getItemModuleRoute(), itemId).toString();
|
return new URLCombiner(getItemModuleRoute(), itemId).toString();
|
||||||
}
|
}
|
||||||
|
@@ -132,7 +132,7 @@ describe('DsoRedirectDataService', () => {
|
|||||||
redir.subscribe();
|
redir.subscribe();
|
||||||
scheduler.schedule(() => redir);
|
scheduler.schedule(() => redir);
|
||||||
scheduler.flush();
|
scheduler.flush();
|
||||||
expect(router.navigate).toHaveBeenCalledWith(['/entities/Publication/' + remoteData.payload.uuid]);
|
expect(router.navigate).toHaveBeenCalledWith(['/entities/publication/' + remoteData.payload.uuid]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should navigate to collections route', () => {
|
it('should navigate to collections route', () => {
|
||||||
|
Reference in New Issue
Block a user