mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
BUGFIX: Encode special characters when sending workflow action
This commit is contained in:
@@ -265,11 +265,13 @@ export class RequestService {
|
||||
if (isNotEmpty(body) && typeof body === 'object') {
|
||||
Object.keys(body)
|
||||
.forEach((param) => {
|
||||
const paramValue = `${param}=${body[param]}`;
|
||||
const encodedParam = encodeURIComponent(param);
|
||||
const encodedBody = encodeURIComponent(body[param]);
|
||||
const paramValue = `${encodedParam}=${encodedBody}`;
|
||||
queryParams = isEmpty(queryParams) ? queryParams.concat(paramValue) : queryParams.concat('&', paramValue);
|
||||
});
|
||||
}
|
||||
return encodeURI(queryParams);
|
||||
return queryParams;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user