Skip to content

Commit b6c4463

Browse files
Merge pull request #3 from Enclude-Components/feature/single-quote-bugfix
# Changes - Fixed string terminating error [Reference](https://stackoverflow.com/questions/41491222/single-quote-escaping-in-microsoft-graph)
2 parents a9a5198 + 869f659 commit b6c4463

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

force-app/main/default/classes/Sharepoint.cls

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ global with sharing class Sharepoint {
2525
}
2626
global static SharepointSearchResponse searchFolder(String query) {
2727
String basePath = getBasePath();
28-
query = EncodingUtil.urlEncode(query, 'UTF-8');
28+
query = EncodingUtil.urlEncode(
29+
query.replace('\'', '\'\''),
30+
'UTF-8'
31+
);
2932
HttpRequest req = new HttpRequest();
3033
req.setMethod('GET');
3134
HttpResponse res = QKomGraphUtils.send(

0 commit comments

Comments
 (0)