ensure users MXID is encoded in the datagrid links and create/edit form redirects, fixes #477
This commit is contained in:
parent
bac962c127
commit
e2d3c0792b
@ -178,7 +178,7 @@ export const UserList = (props: ListProps) => (
|
||||
perPage={50}
|
||||
>
|
||||
<DatagridConfigurable
|
||||
rowClick={(id: Identifier, resource: string) => `/${resource}/${id}`}
|
||||
rowClick={(id: Identifier, resource: string) => `/${resource}/${encodeURIComponent(id)}`}
|
||||
bulkActionButtons={<UserBulkActionButtons />}
|
||||
>
|
||||
<AvatarField
|
||||
@ -283,7 +283,7 @@ export const UserCreate = (props: CreateProps) => {
|
||||
onSuccess: (resource: User) => {
|
||||
notify("ra.notification.created", { messageArgs: { smart_count: 1 } });
|
||||
redirect(() => {
|
||||
return `users/${resource.id}`;
|
||||
return `users/${encodeURIComponent(resource.id)}`;
|
||||
});
|
||||
},
|
||||
}
|
||||
@ -307,7 +307,7 @@ export const UserCreate = (props: CreateProps) => {
|
||||
onSuccess: (resource: User) => {
|
||||
notify("ra.notification.updated", { messageArgs: { smart_count: 1 } });
|
||||
redirect(() => {
|
||||
return `users/${resource.id}`;
|
||||
return `users/${encodeURIComponent(resource.id)}`;
|
||||
});
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user