From e73dd8466167dc1356de5a9a191495757a29abd1 Mon Sep 17 00:00:00 2001 From: acristu Date: Thu, 10 Feb 2022 12:33:11 +0200 Subject: [PATCH] Update GraphRequest.ts quickfix for https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/529 --- src/GraphRequest.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GraphRequest.ts b/src/GraphRequest.ts index e7f5999df..2cbec3e40 100644 --- a/src/GraphRequest.ts +++ b/src/GraphRequest.ts @@ -224,14 +224,14 @@ export class GraphRequest { if (Object.keys(urlComponents.oDataQueryParams).length !== 0) { for (const property in urlComponents.oDataQueryParams) { if (Object.prototype.hasOwnProperty.call(urlComponents.oDataQueryParams, property)) { - query.push(property + "=" + urlComponents.oDataQueryParams[property]); + query.push(property + "=" + encodeURIComponent(urlComponents.oDataQueryParams[property])); } } } if (Object.keys(urlComponents.otherURLQueryParams).length !== 0) { for (const property in urlComponents.otherURLQueryParams) { if (Object.prototype.hasOwnProperty.call(urlComponents.otherURLQueryParams, property)) { - query.push(property + "=" + urlComponents.otherURLQueryParams[property]); + query.push(property + "=" + encodeURIComponent(urlComponents.otherURLQueryParams[property])); } } }