mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-19 16:03:02 +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') {
|
if (isNotEmpty(body) && typeof body === 'object') {
|
||||||
Object.keys(body)
|
Object.keys(body)
|
||||||
.forEach((param) => {
|
.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);
|
queryParams = isEmpty(queryParams) ? queryParams.concat(paramValue) : queryParams.concat('&', paramValue);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return encodeURI(queryParams);
|
return queryParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user